diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/App.config b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/App.config
new file mode 100644
index 0000000..8d23437
--- /dev/null
+++ b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/App.ico b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/App.ico
new file mode 100644
index 0000000..4b7c41b
Binary files /dev/null and b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/App.ico differ
diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/App.xaml b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/App.xaml
new file mode 100644
index 0000000..038b865
--- /dev/null
+++ b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/App.xaml
@@ -0,0 +1,6 @@
+
+
+
diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/App.xaml.cs b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/App.xaml.cs
new file mode 100644
index 0000000..1c29fe0
--- /dev/null
+++ b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/App.xaml.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.IO;
+using System.Reflection;
+using System.Text;
+using System.Windows;
+using Syncfusion.Licensing;
+
+namespace UserInteraction_Stencil
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ public App()
+ {
+ // SyncfusionLicenseProvider.RegisterLicense("");
+ }
+
+ ///
+ /// Helper method to find a syncfusion license key from the Common folder
+ ///
+ /// File name of the syncfusion license key
+ ///
+ //public static string FindLicenseKey()
+ //{
+ // int levelsToCheck = 12;
+ // string filePath = @"Common\SyncfusionLicense.txt";
+
+ // string rootPath = System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().CodeBase.Replace(@"file:///", ""));
+
+ // for (int n = 0; n < levelsToCheck; n++)
+ // {
+ // string fileDataPath = System.IO.Path.Combine(rootPath, filePath);
+ // if (System.IO.File.Exists(fileDataPath))
+ // return File.ReadAllText(fileDataPath, Encoding.UTF8);
+ // DirectoryInfo rootDirectory = Directory.GetParent(rootPath);
+ // if (rootDirectory == null)
+ // break;
+ // rootPath = rootDirectory.FullName;
+ // }
+ // return string.Empty;
+ //}
+ }
+}
diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/MainWindow.xaml b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/MainWindow.xaml
new file mode 100644
index 0000000..aea44e1
--- /dev/null
+++ b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/MainWindow.xaml
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/MainWindow.xaml.cs b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/MainWindow.xaml.cs
new file mode 100644
index 0000000..7a8fd57
--- /dev/null
+++ b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/MainWindow.xaml.cs
@@ -0,0 +1,99 @@
+using Microsoft.Win32;
+using Syncfusion.UI.Xaml.Diagram;
+using Syncfusion.UI.Xaml.Diagram.Stencil;
+using System;
+using System.Collections.ObjectModel;
+using System.ComponentModel.DataAnnotations;
+using System.Globalization;
+using System.IO;
+using System.Reflection;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Markup;
+
+namespace UserInteraction_Stencil
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+
+ private void ComboBox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
+ {
+ ComboBox comboBox = sender as ComboBox;
+ ComboBoxItem selectedItem = comboBox.SelectedItem as ComboBoxItem;
+ if (selectedItem.Content.ToString() == "Icons Only")
+ {
+ stencil.SymbolsDisplayMode = Syncfusion.UI.Xaml.Diagram.SymbolsDisplayMode.IconsOnly;
+ }
+ else
+ {
+ stencil.SymbolsDisplayMode = Syncfusion.UI.Xaml.Diagram.SymbolsDisplayMode.NamesUnderIcons;
+ }
+ }
+
+ private void Save_Click(object sender, RoutedEventArgs e)
+ {
+ SaveFileDialog dialog = new SaveFileDialog();
+ dialog.Title = "Save XAML";
+
+ dialog.Filter = "XAML File (*.xaml)|*.xaml";
+ if (dialog.ShowDialog() == true)
+ {
+ using (Stream s = File.Open(dialog.FileName, FileMode.OpenOrCreate))
+ {
+ stencil.Save(s);
+ }
+ }
+ }
+
+ private void Load_Click(object sender, RoutedEventArgs e)
+ {
+ stencil.SymbolGroups = new SymbolGroups();
+
+ OpenFileDialog dialog = new OpenFileDialog();
+ if (dialog.ShowDialog() == true)
+ {
+ using (Stream myStream = dialog.OpenFile())
+ {
+ stencil.Load(myStream, LoadSettings.IsChecked.Value);
+ }
+ }
+ }
+ }
+
+ public class EnumDisplayNameConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value == null || value.ToString() == "")
+ return string.Empty;
+
+ FieldInfo fieldInfo = value.GetType().GetField(value.ToString());
+ if (fieldInfo != null)
+ {
+ var attributes = fieldInfo.GetCustomAttributes(typeof(DisplayAttribute), false);
+ if (attributes.Length > 0)
+ {
+ var attribute = attributes[0] as DisplayAttribute;
+ if (!String.IsNullOrEmpty(attribute.Name))
+ return attribute.Name;
+ else if (!String.IsNullOrEmpty(attribute.ShortName))
+ return attribute.ShortName;
+ }
+ }
+ return Enum.GetName(value.GetType(), value);
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Properties/AssemblyInfo.cs b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..4cfa73a
--- /dev/null
+++ b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Properties/AssemblyInfo.cs
@@ -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("Stencil")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Stencil")]
+[assembly: AssemblyCopyright("Copyright © 2016")]
+[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
+//CultureYouAreCodingWith in your .csproj file
+//inside a . For example, if you are using US english
+//in your source files, set the 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")]
diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Properties/Resources.Designer.cs b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..a343713
--- /dev/null
+++ b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Properties/Resources.Designer.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Stencil.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Stencil.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Properties/Resources.resx b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Properties/Settings.Designer.cs b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..2cbe7fd
--- /dev/null
+++ b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Properties/Settings.Designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Stencil.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.12.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Properties/Settings.settings b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Properties/Settings.settings
new file mode 100644
index 0000000..033d7a5
--- /dev/null
+++ b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_462.csproj b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_462.csproj
new file mode 100644
index 0000000..7160100
--- /dev/null
+++ b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_462.csproj
@@ -0,0 +1,116 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {23827021-61DF-4DBC-AB7D-D059B401CFEC}
+ WinExe
+ Properties
+ Stencil
+ Stencil
+ v4.6.2
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+ true
+
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+ MainWindow.xaml
+ Code
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_462.sln b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_462.sln
new file mode 100644
index 0000000..05f4ec2
--- /dev/null
+++ b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_462.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.12.35209.166
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stencil_Save_and_Load_462", "Stencil_Save_and_Load_462.csproj", "{23827021-61DF-4DBC-AB7D-D059B401CFEC}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {23827021-61DF-4DBC-AB7D-D059B401CFEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {23827021-61DF-4DBC-AB7D-D059B401CFEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {23827021-61DF-4DBC-AB7D-D059B401CFEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {23827021-61DF-4DBC-AB7D-D059B401CFEC}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {84FB336B-7B04-4060-AB6A-978662DB3D42}
+ EndGlobalSection
+EndGlobal
diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_60.csproj b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_60.csproj
new file mode 100644
index 0000000..f367142
--- /dev/null
+++ b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_60.csproj
@@ -0,0 +1,41 @@
+
+
+ WinExe
+ net6.0-windows
+ true
+ true
+ False
+ false
+ false
+ Stencil
+ Stencil
+
+
+ TRACE;NET50
+
+
+ TRACE;NET50
+
+
+ TRACE;NET50
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+
+
+
\ No newline at end of file
diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_60.sln b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_60.sln
new file mode 100644
index 0000000..954b993
--- /dev/null
+++ b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_60.sln
@@ -0,0 +1,24 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.31410.414
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stencil_Save_and_Load_60", "Stencil_Save_and_Load_60.csproj", "{23827021-61DF-4DBC-AB7D-D059B401CFEC}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {23827021-61DF-4DBC-AB7D-D059B401CFEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {23827021-61DF-4DBC-AB7D-D059B401CFEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {23827021-61DF-4DBC-AB7D-D059B401CFEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {23827021-61DF-4DBC-AB7D-D059B401CFEC}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {84FB336B-7B04-4060-AB6A-978662DB3D42}
+ EndGlobalSection
+EndGlobal
diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_80.csproj b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_80.csproj
new file mode 100644
index 0000000..f68c1a3
--- /dev/null
+++ b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_80.csproj
@@ -0,0 +1,41 @@
+
+
+ WinExe
+ net8.0-windows
+ true
+ true
+ False
+ false
+ false
+ Stencil
+ Stencil
+
+
+ TRACE;NET50
+
+
+ TRACE;NET50
+
+
+ TRACE;NET50
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+
+
+
\ No newline at end of file
diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_80.sln b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_80.sln
new file mode 100644
index 0000000..b904989
--- /dev/null
+++ b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Stencil_Save_and_Load_80.sln
@@ -0,0 +1,24 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.8.226.21692
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stencil_Save_and_Load_80", "Stencil_Save_and_Load_80.csproj", "{23827021-61DF-4DBC-AB7D-D059B401CFEC}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {23827021-61DF-4DBC-AB7D-D059B401CFEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {23827021-61DF-4DBC-AB7D-D059B401CFEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {23827021-61DF-4DBC-AB7D-D059B401CFEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {23827021-61DF-4DBC-AB7D-D059B401CFEC}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {84FB336B-7B04-4060-AB6A-978662DB3D42}
+ EndGlobalSection
+EndGlobal
diff --git a/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Viewmodel/StencilVM.cs b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Viewmodel/StencilVM.cs
new file mode 100644
index 0000000..ef21317
--- /dev/null
+++ b/Samples/Stencil/Stencil Save and Load/Stencil Save and Load/Viewmodel/StencilVM.cs
@@ -0,0 +1,253 @@
+using Syncfusion.UI.Xaml.Diagram;
+using Syncfusion.UI.Xaml.Diagram.Stencil;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace UserInteraction_Stencil.Viewmodel
+{
+ public class StencilViewModel : DiagramViewModel
+ {
+ private SymbolSelectionMode symbolSelectionMode = SymbolSelectionMode.Multiple;
+ private SymbolGroupDisplayMode symbolGroupDisplayMode = SymbolGroupDisplayMode.List;
+ private SymbolsDisplayMode symbolDisplayMode = SymbolsDisplayMode.IconsOnly;
+ private DisplayMode displayMode = DisplayMode.Expanded;
+ private bool showSearchTextBox = true;
+ private bool showDisplayModeToggleButton = true;
+ private bool showPreview = false;
+ private bool enableReorder = true;
+ private StencilConstraints stencilConstraints = StencilConstraints.Default;
+
+ public StencilViewModel()
+ {
+ Symbolfilters = new SymbolFilters();
+
+ SymbolFilterProvider node1 = new SymbolFilterProvider { Content = "Basic Shapes", IsChecked = true, SymbolFilter = Filter };
+ SymbolFilterProvider node2 = new SymbolFilterProvider { Content = "Flow Shapes", IsChecked = true, SymbolFilter = Filter };
+ SymbolFilterProvider node3 = new SymbolFilterProvider { Content = "Arrow Shapes", IsChecked = true, SymbolFilter = Filter };
+ SymbolFilterProvider node4 = new SymbolFilterProvider { Content = "DataFlow Shapes", SymbolFilter = Filter };
+ SymbolFilterProvider node5 = new SymbolFilterProvider { Content = "UMLActivity Shapes", SymbolFilter = Filter };
+ SymbolFilterProvider node6 = new SymbolFilterProvider { Content = "UMLUseCase Shapes", SymbolFilter = Filter };
+ SymbolFilterProvider node7 = new SymbolFilterProvider { Content = "UMLRelationship Shapes", SymbolFilter = Filter };
+ SymbolFilterProvider node8 = new SymbolFilterProvider { Content = "Swimlane Shapes", SymbolFilter = Filter };
+ SymbolFilterProvider node9 = new SymbolFilterProvider { Content = "BPMNEditor Shapes", SymbolFilter = Filter };
+ this.Symbolfilters.Add(node1);
+ this.Symbolfilters.Add(node2);
+ this.Symbolfilters.Add(node3);
+ this.Symbolfilters.Add(node4);
+ this.Symbolfilters.Add(node5);
+ this.Symbolfilters.Add(node6);
+ this.Symbolfilters.Add(node7);
+ this.Symbolfilters.Add(node8);
+ this.Symbolfilters.Add(node9);
+ this.Selectedfilter = Symbolfilters[0];
+ }
+
+ // Define filtering of Symbols
+ private bool Filter(SymbolFilterProvider sender, object symbol)
+ {
+ if (symbol is NodeViewModel && (symbol as NodeViewModel).ParentGroup == null)
+ {
+ if (sender.Content.ToString() == (symbol as NodeViewModel).Key.ToString())
+ return true;
+ }
+ if (symbol is LaneViewModel)
+ {
+ if (sender.Content.ToString() == (symbol as LaneViewModel).Key.ToString())
+ return true;
+ }
+ if (symbol is PhaseViewModel)
+ {
+ if (sender.Content.ToString() == (symbol as PhaseViewModel).Key.ToString())
+ return true;
+ }
+ if (symbol is ConnectorViewModel)
+ {
+ if (sender.Content.ToString() == (symbol as ConnectorViewModel).Key.ToString())
+ return true;
+ }
+ return false;
+ }
+
+ private SymbolFilters symbolfilters;
+
+ public SymbolFilters Symbolfilters
+ {
+ get
+ {
+ return symbolfilters;
+ }
+ set
+ {
+ symbolfilters = value;
+ OnPropertyChanged("Symbolfilters");
+ }
+ }
+
+ private SymbolFilterProvider selectedfilter;
+
+ public SymbolFilterProvider Selectedfilter
+ {
+ get
+ {
+ return selectedfilter;
+ }
+ set
+ {
+ selectedfilter = value;
+ OnPropertyChanged("Selectedfilter");
+ }
+ }
+ public SymbolSelectionMode SymbolSelectionMode
+ {
+ get
+ {
+ return symbolSelectionMode;
+ }
+ set
+ {
+ symbolSelectionMode = value;
+ OnPropertyChanged("SymbolSelectionMode");
+ }
+ }
+
+ public SymbolGroupDisplayMode SymbolGroupDisplayMode
+ {
+ get
+ {
+ return symbolGroupDisplayMode;
+ }
+ set
+ {
+ symbolGroupDisplayMode = value;
+ OnPropertyChanged("SymbolGroupDisplayMode");
+ }
+
+ }
+
+
+ public SymbolsDisplayMode SymbolsDisplayMode
+ {
+ get
+ {
+ return symbolDisplayMode;
+ }
+ set
+ {
+ symbolDisplayMode = value;
+ OnPropertyChanged("SymbolsDisplayMode");
+ }
+ }
+
+ public DisplayMode DisplayMode
+ {
+ get
+ {
+ return displayMode;
+ }
+ set
+ {
+ displayMode = value;
+ OnPropertyChanged("DisplayMode");
+ }
+ }
+
+ public bool ShowSearchTextBox
+ {
+ get
+ {
+ return showSearchTextBox;
+ }
+ set
+ {
+ showSearchTextBox = value;
+ OnPropertyChanged("ShowSearchTextBox");
+ }
+ }
+
+ public bool ShowDisplayModeToggleButton
+ {
+ get
+ {
+ return showDisplayModeToggleButton;
+ }
+ set
+ {
+ showDisplayModeToggleButton = value;
+ OnPropertyChanged("ShowDisplayModeToggleButton");
+ }
+ }
+
+ public bool ShowPreview
+ {
+ get
+ {
+ return showPreview;
+ }
+ set
+ {
+ showPreview = value;
+ OnPropertyChanged("ShowPreview");
+ }
+ }
+
+ public bool EnableReorder
+ {
+ get
+ {
+ return enableReorder;
+ }
+ set
+ {
+ enableReorder = value;
+ OnPropertyChanged("EnableReorder");
+ }
+ }
+
+ public StencilConstraints StencilConstraints
+ {
+ get
+ {
+ return stencilConstraints;
+ }
+ set
+ {
+ stencilConstraints = value;
+ OnPropertyChanged("StencilConstraints");
+ }
+ }
+
+ protected override void OnPropertyChanged(string name)
+ {
+ base.OnPropertyChanged(name);
+ switch (name)
+ {
+ case "ShowPreview":
+ if (this.StencilConstraints.Contains(StencilConstraints.ShowPreview))
+ {
+ this.StencilConstraints &= ~StencilConstraints.ShowPreview;
+ }
+ else
+ {
+ this.StencilConstraints |= StencilConstraints.ShowPreview;
+ }
+ break;
+
+ case "EnableReorder":
+ if (this.StencilConstraints.Contains(StencilConstraints.AllowDragDrop))
+ {
+ this.StencilConstraints &= ~StencilConstraints.AllowDragDrop;
+ }
+ else
+ {
+ this.StencilConstraints |= StencilConstraints.AllowDragDrop;
+ }
+ break;
+ }
+ }
+ }
+}