-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Samples are revamped for symbol group view model implementation.
- Loading branch information
1 parent
d965a59
commit db736ab
Showing
17 changed files
with
623 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
Samples/Stencil/Stencil-with-node-connector-group/StencilDiagramElements/packages.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Syncfusion.Licensing" version="25.2.6" targetFramework="net462" /> | ||
<package id="Syncfusion.SfDiagram.WPF" version="25.2.6" targetFramework="net462" /> | ||
<package id="Syncfusion.Shared.WPF" version="25.2.6" targetFramework="net462" /> | ||
<package id="Syncfusion.Licensing" version="26.1.35" targetFramework="net462" /> | ||
<package id="Syncfusion.SfDiagram.WPF" version="26.1.35" targetFramework="net462" /> | ||
<package id="Syncfusion.Shared.WPF" version="26.1.35" targetFramework="net462" /> | ||
</packages> |
13 changes: 13 additions & 0 deletions
13
Samples/Stencil/SymbolGroupViewModel/BasicSymbolGroupViewModel/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# SymbolGroupViewModel sample | ||
|
||
This sample demonstrate how to create the symbol group view model to the stencil with symbols, name, category source properties. | ||
|
||
__*Documentation*__: https://help.syncfusion.com/wpf/diagram/serialization | ||
## Project pre-requisites | ||
To run this application, you need to have the below two in your system | ||
|
||
* [Visual Studio 2019](https://www.visualstudio.com/wpf-vs) | ||
* [Syncfusion.SfDiagram.WPF](https://www.nuget.org/packages/Syncfusion.SfDiagram.WPF/) nuget package. To install the package using NuGet Package Manager, refer this [link](https://docs.microsoft.com/en-us/nuget/quickstart/install-and-use-a-package-in-visual-studio#nuget-package-manager). | ||
|
||
## Deploying and running the sample | ||
* To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging. |
6 changes: 6 additions & 0 deletions
6
Samples/Stencil/SymbolGroupViewModel/BasicSymbolGroupViewModel/Sample/App.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /> | ||
</startup> | ||
</configuration> |
9 changes: 9 additions & 0 deletions
9
Samples/Stencil/SymbolGroupViewModel/BasicSymbolGroupViewModel/Sample/App.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Application x:Class="SymbolGroupViewModelScenarios.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:SymbolGroupViewModelScenarios" | ||
StartupUri="MainWindow.xaml"> | ||
<Application.Resources> | ||
|
||
</Application.Resources> | ||
</Application> |
17 changes: 17 additions & 0 deletions
17
Samples/Stencil/SymbolGroupViewModel/BasicSymbolGroupViewModel/Sample/App.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Configuration; | ||
using System.Data; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
|
||
namespace SymbolGroupViewModelScenarios | ||
{ | ||
/// <summary> | ||
/// Interaction logic for App.xaml | ||
/// </summary> | ||
public partial class App : Application | ||
{ | ||
} | ||
} |
106 changes: 106 additions & 0 deletions
106
Samples/Stencil/SymbolGroupViewModel/BasicSymbolGroupViewModel/Sample/MainWindow.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<Window x:Class="SymbolGroupViewModelScenarios.MainWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:local="clr-namespace:SymbolGroupViewModelScenarios" | ||
mc:Ignorable="d" | ||
xmlns:syncfusion="http://schemas.syncfusion.com/wpf" | ||
Title="MainWindow" Height="450" Width="800"> | ||
<Window.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceDictionary Source="/Syncfusion.SfDiagram.Wpf;component/Resources/BasicShapes.xaml"/> | ||
</ResourceDictionary.MergedDictionaries> | ||
|
||
<Style TargetType="syncfusion:Node"> | ||
<Setter Property="ShapeStyle"> | ||
<Setter.Value> | ||
<Style TargetType="Path"> | ||
<Setter Property="Fill" Value="#FF5B9BD5"/> | ||
<Setter Property="Stretch" Value="Fill"/> | ||
<Setter Property="Stroke" Value="#FFEDF1F6"/> | ||
</Style> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
|
||
<!--Style for Symbol--> | ||
<Style TargetType="syncfusion:Symbol"> | ||
<Setter Property="Width" | ||
Value="50" /> | ||
<Setter Property="Height" | ||
Value="50" /> | ||
<Setter Property="BorderThickness" | ||
Value="1" /> | ||
<Setter Property="Background" | ||
Value="Transparent" /> | ||
<Setter Property="BorderBrush" | ||
Value="Transparent" /> | ||
</Style> | ||
|
||
</ResourceDictionary> | ||
</Window.Resources> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="300"/> | ||
<ColumnDefinition Width="*"/> | ||
</Grid.ColumnDefinitions> | ||
<syncfusion:Stencil x:Name="stencil1" | ||
Title="Shapes" | ||
SymbolGroupDisplayMode="Accordion" | ||
SymbolSelectionMode="Multiple" | ||
DisplayMode="Expanded" | ||
Grid.Column="0" | ||
GroupMappingName="Key"> | ||
<syncfusion:Stencil.SymbolGroups> | ||
<syncfusion:SymbolGroups> | ||
<syncfusion:SymbolGroupViewModel Name="Basic Shapes" CategorySource="{StaticResource BasicShapes}"> | ||
<syncfusion:SymbolGroupViewModel.Symbols> | ||
<syncfusion:SymbolCollection> | ||
<syncfusion:NodeViewModel Name="Object" | ||
UnitHeight="50" | ||
UnitWidth="50" | ||
Shape="{StaticResource Object}"/> | ||
<syncfusion:NodeViewModel Name="User" | ||
UnitHeight="50" | ||
UnitWidth="50" | ||
Shape="{StaticResource User}"/> | ||
</syncfusion:SymbolCollection> | ||
</syncfusion:SymbolGroupViewModel.Symbols> | ||
</syncfusion:SymbolGroupViewModel> | ||
</syncfusion:SymbolGroups> | ||
</syncfusion:Stencil.SymbolGroups> | ||
</syncfusion:Stencil> | ||
|
||
<syncfusion:SfDiagram x:Name="diagram1" Grid.Column="1"> | ||
<syncfusion:SfDiagram.HorizontalRuler> | ||
<syncfusion:Ruler/> | ||
</syncfusion:SfDiagram.HorizontalRuler> | ||
<syncfusion:SfDiagram.VerticalRuler> | ||
<syncfusion:Ruler Orientation="Vertical"/> | ||
</syncfusion:SfDiagram.VerticalRuler> | ||
<syncfusion:SfDiagram.SnapSettings> | ||
<syncfusion:SnapSettings SnapConstraints="All"/> | ||
</syncfusion:SfDiagram.SnapSettings> | ||
<syncfusion:SfDiagram.Nodes> | ||
<syncfusion:NodeCollection> | ||
|
||
</syncfusion:NodeCollection> | ||
</syncfusion:SfDiagram.Nodes> | ||
<syncfusion:SfDiagram.Connectors> | ||
<syncfusion:ConnectorCollection> | ||
|
||
</syncfusion:ConnectorCollection> | ||
</syncfusion:SfDiagram.Connectors> | ||
<syncfusion:SfDiagram.Groups> | ||
<syncfusion:GroupCollection> | ||
|
||
</syncfusion:GroupCollection> | ||
</syncfusion:SfDiagram.Groups> | ||
|
||
</syncfusion:SfDiagram> | ||
</Grid> | ||
</Window> | ||
|
||
|
30 changes: 30 additions & 0 deletions
30
Samples/Stencil/SymbolGroupViewModel/BasicSymbolGroupViewModel/Sample/MainWindow.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Syncfusion.UI.Xaml.Diagram; | ||
using Syncfusion.UI.Xaml.Diagram.Stencil; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
|
||
namespace SymbolGroupViewModelScenarios | ||
{ | ||
/// <summary> | ||
/// Interaction logic for MainWindow.xaml | ||
/// </summary> | ||
public partial class MainWindow : Window | ||
{ | ||
public MainWindow() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
.../Stencil/SymbolGroupViewModel/BasicSymbolGroupViewModel/Sample/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System.Reflection; | ||
using System.Resources; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
using System.Windows; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("SymbolGroupViewModelScenarios")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("SymbolGroupViewModelScenarios")] | ||
[assembly: AssemblyCopyright("Copyright © 2024")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
//In order to begin building localizable applications, set | ||
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file | ||
//inside a <PropertyGroup>. For example, if you are using US english | ||
//in your source files, set the <UICulture> to en-US. Then uncomment | ||
//the NeutralResourceLanguage attribute below. Update the "en-US" in | ||
//the line below to match the UICulture setting in the project file. | ||
|
||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] | ||
|
||
|
||
[assembly: ThemeInfo( | ||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located | ||
//(used if a resource is not found in the page, | ||
// or application resource dictionaries) | ||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located | ||
//(used if a resource is not found in the page, | ||
// app, or any theme specific resource dictionaries) | ||
)] | ||
|
||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
71 changes: 71 additions & 0 deletions
71
...il/SymbolGroupViewModel/BasicSymbolGroupViewModel/Sample/Properties/Resources.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.