Updated README - and included in nuget package
This commit is contained in:
Родитель
5514ceabfb
Коммит
ec62835399
27
README.md
27
README.md
|
@ -5,7 +5,7 @@ A graph layout panel for [AvaloniaUI](https://github.com/AvaloniaUI/Avalonia)
|
||||||
Each individual graph is displayed through the GraphPanel control included in the assembly
|
Each individual graph is displayed through the GraphPanel control included in the assembly
|
||||||
```xml
|
```xml
|
||||||
<Window xmlns:agc="clr-namespace:AvaloniaGraphControl;assembly=AvaloniaGraphControl">
|
<Window xmlns:agc="clr-namespace:AvaloniaGraphControl;assembly=AvaloniaGraphControl">
|
||||||
<agc:GraphPanel Graph="{Binding MyGraph}" Zoom="1.2" LayoutMethod="SugiyamaScheme" />
|
<agc:GraphPanel Graph="{Binding MyGraph}" LayoutMethod="SugiyamaScheme" />
|
||||||
</Window>
|
</Window>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -20,6 +20,31 @@ The following layout methods are available in MSAGL and can be set in the GraphP
|
||||||
The GraphPanel control and the MSAGL assemblies are bundled in [a nuget package](https://www.nuget.org/packages/AvaloniaGraphControl/).
|
The GraphPanel control and the MSAGL assemblies are bundled in [a nuget package](https://www.nuget.org/packages/AvaloniaGraphControl/).
|
||||||
The existing MSAGL nuget packages are dedicated to the .NET Framework and do not include any netstandard assembly.
|
The existing MSAGL nuget packages are dedicated to the .NET Framework and do not include any netstandard assembly.
|
||||||
|
|
||||||
|
### MVVM
|
||||||
|
|
||||||
|
The GraphPanel control leverages the [MVVM pattern used by AvaloniaUI](https://docs.avaloniaui.net/docs/next/concepts/the-mvvm-pattern/).
|
||||||
|
Each node of the graph view can be customized according to the underlying view model in the graph definition.
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<Window xmlns:agc="clr-namespace:AvaloniaGraphControl;assembly=AvaloniaGraphControl">
|
||||||
|
<agc:GraphPanel Graph="{Binding MyGraph}" LayoutMethod="SugiyamaScheme" />
|
||||||
|
<agc:GraphPanel.DataTemplates>
|
||||||
|
<DataTemplate DataType="{x:Type local:StandardItem}">
|
||||||
|
<agc:TextSticker Text="{Binding Name}" Shape="Ellipse" Padding="30,10" />
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type local:InteractiveItem}">
|
||||||
|
<ToggleButton Content="{Binding Name}" Padding="20,5" />
|
||||||
|
</DataTemplate>
|
||||||
|
</agc:GraphPanel.DataTemplates>
|
||||||
|
</agc:GraphPanel>
|
||||||
|
</Window>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Cross-platform
|
||||||
|
|
||||||
|
As shown in the demo, this graph panel can be used in cross-platform AvaloniaUI applications.
|
||||||
|
It was successfully tested on Linux Desktop, Windows Desktop, Android and Browser (web assembly) environments.
|
||||||
|
|
||||||
## Example of graph definition
|
## Example of graph definition
|
||||||
|
|
||||||
```C#
|
```C#
|
||||||
|
|
|
@ -3,13 +3,14 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.1</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<LangVersion>latestmajor</LangVersion>
|
<LangVersion>latestmajor</LangVersion>
|
||||||
<Version>0.6.0</Version>
|
<Version>0.6.1</Version>
|
||||||
<Authors>Olivier Azeau</Authors>
|
<Authors>Olivier Azeau</Authors>
|
||||||
<Product>AvaloniaGraphControl</Product>
|
<Product>AvaloniaGraphControl</Product>
|
||||||
<PackageId>AvaloniaGraphControl</PackageId>
|
<PackageId>AvaloniaGraphControl</PackageId>
|
||||||
<NeutralLanguage>en</NeutralLanguage>
|
<NeutralLanguage>en</NeutralLanguage>
|
||||||
<Description>A graph layout panel for AvaloniaUI</Description>
|
<Description>A graph layout panel for AvaloniaUI</Description>
|
||||||
<Copyright>Copyright © Olivier Azeau</Copyright>
|
<Copyright>Copyright © Olivier Azeau</Copyright>
|
||||||
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
<IncludeSymbols>true</IncludeSymbols>
|
<IncludeSymbols>true</IncludeSymbols>
|
||||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||||
<RepositoryUrl>https://github.com/Oaz/AvaloniaGraphControl.git</RepositoryUrl>
|
<RepositoryUrl>https://github.com/Oaz/AvaloniaGraphControl.git</RepositoryUrl>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче