From c5793c8e72fe2388942ef4fee022c0e759f75d85 Mon Sep 17 00:00:00 2001 From: ArunKumarSF4054 Date: Thu, 29 Aug 2024 18:16:01 +0530 Subject: [PATCH] WPF-900304 -Samples for indexing --- .../CustomDataSource/App.config | 6 + .../CustomDataSource/App.xaml | 9 + .../CustomDataSource/App.xaml.cs | 17 + .../CustomDataSource_462.csproj | 109 +++++ .../CustomDataSource/CustomDataSource_462.sln | 25 + .../CustomDataSource_60.csproj | 109 +++++ .../CustomDataSource_60.csproj.user | 12 + .../CustomDataSource/CustomDataSource_60.sln | 24 + .../CustomDataSource_80.csproj | 109 +++++ .../CustomDataSource_80.csproj.user | 12 + .../CustomDataSource/CustomDataSource_80.sln | 24 + .../CustomDataSource/MainWindow.xaml | 83 ++++ .../CustomDataSource/MainWindow.xaml.cs | 433 ++++++++++++++++++ .../CustomDataSource/Model/ItemInfo.cs | 63 +++ .../CustomDataSource/NodeCreate.xaml | 27 ++ .../CustomDataSource/NodeCreate.xaml.cs | 50 ++ .../Properties/AssemblyInfo.cs | 55 +++ .../Properties/Resources.Designer.cs | 71 +++ .../Properties/Resources.resx | 117 +++++ .../Properties/Settings.Designer.cs | 30 ++ .../Properties/Settings.settings | 7 + .../Custom DataSource/README.md | 17 + Samples/Selection/Node Selection/README.md | 5 + .../Selection/Node Selection/Test/App.config | 14 + .../Selection/Node Selection/Test/App.xaml | 9 + .../Selection/Node Selection/Test/App.xaml.cs | 17 + .../Node Selection/Test/MainWindow.xaml | 53 +++ .../Node Selection/Test/MainWindow.xaml.cs | 117 +++++ .../Test/Properties/AssemblyInfo.cs | 55 +++ .../Test/Properties/Resources.Designer.cs | 71 +++ .../Test/Properties/Resources.resx | 117 +++++ .../Test/Properties/Settings.Designer.cs | 30 ++ .../Test/Properties/Settings.settings | 7 + .../Node Selection/Test/Test_462.csproj | 102 +++++ .../Node Selection/Test/Test_462.sln | 25 + .../Node Selection/Test/Test_60.csproj | 105 +++++ .../Selection/Node Selection/Test/Test_60.sln | 24 + .../Node Selection/Test/Test_80.csproj | 105 +++++ .../Selection/Node Selection/Test/Test_80.sln | 24 + .../Selector Tooptip sample/README.md | 7 + .../Selector Tooltip/App.config | 6 + .../Selector Tooltip/App.xaml | 9 + .../Selector Tooltip/App.xaml.cs | 17 + .../Selector Tooltip/MainWindow.xaml | 195 ++++++++ .../Selector Tooltip/MainWindow.xaml.cs | 44 ++ .../Properties/AssemblyInfo.cs | 55 +++ .../Properties/Resources.Designer.cs | 71 +++ .../Properties/Resources.resx | 117 +++++ .../Properties/Settings.Designer.cs | 30 ++ .../Properties/Settings.settings | 7 + .../Selector Tooltip_462.csproj | 102 +++++ .../Selector Tooltip/Selector Tooltip_462.sln | 25 + .../Selector Tooltip_60.csproj | 64 +++ .../Selector Tooltip/Selector Tooltip_60.sln | 24 + .../Selector Tooltip_80.csproj | 64 +++ .../Selector Tooltip/Selector Tooltip_80.sln | 24 + 56 files changed, 3150 insertions(+) create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/App.config create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/App.xaml create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/App.xaml.cs create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_462.csproj create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_462.sln create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_60.csproj create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_60.csproj.user create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_60.sln create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_80.csproj create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_80.csproj.user create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_80.sln create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/MainWindow.xaml create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/MainWindow.xaml.cs create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/Model/ItemInfo.cs create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/NodeCreate.xaml create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/NodeCreate.xaml.cs create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/Properties/AssemblyInfo.cs create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/Properties/Resources.Designer.cs create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/Properties/Resources.resx create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/Properties/Settings.Designer.cs create mode 100644 Samples/Automatic Layout/Custom DataSource/CustomDataSource/Properties/Settings.settings create mode 100644 Samples/Automatic Layout/Custom DataSource/README.md create mode 100644 Samples/Selection/Node Selection/README.md create mode 100644 Samples/Selection/Node Selection/Test/App.config create mode 100644 Samples/Selection/Node Selection/Test/App.xaml create mode 100644 Samples/Selection/Node Selection/Test/App.xaml.cs create mode 100644 Samples/Selection/Node Selection/Test/MainWindow.xaml create mode 100644 Samples/Selection/Node Selection/Test/MainWindow.xaml.cs create mode 100644 Samples/Selection/Node Selection/Test/Properties/AssemblyInfo.cs create mode 100644 Samples/Selection/Node Selection/Test/Properties/Resources.Designer.cs create mode 100644 Samples/Selection/Node Selection/Test/Properties/Resources.resx create mode 100644 Samples/Selection/Node Selection/Test/Properties/Settings.Designer.cs create mode 100644 Samples/Selection/Node Selection/Test/Properties/Settings.settings create mode 100644 Samples/Selection/Node Selection/Test/Test_462.csproj create mode 100644 Samples/Selection/Node Selection/Test/Test_462.sln create mode 100644 Samples/Selection/Node Selection/Test/Test_60.csproj create mode 100644 Samples/Selection/Node Selection/Test/Test_60.sln create mode 100644 Samples/Selection/Node Selection/Test/Test_80.csproj create mode 100644 Samples/Selection/Node Selection/Test/Test_80.sln create mode 100644 Samples/Selection/Selector Tooptip sample/README.md create mode 100644 Samples/Selection/Selector Tooptip sample/Selector Tooltip/App.config create mode 100644 Samples/Selection/Selector Tooptip sample/Selector Tooltip/App.xaml create mode 100644 Samples/Selection/Selector Tooptip sample/Selector Tooltip/App.xaml.cs create mode 100644 Samples/Selection/Selector Tooptip sample/Selector Tooltip/MainWindow.xaml create mode 100644 Samples/Selection/Selector Tooptip sample/Selector Tooltip/MainWindow.xaml.cs create mode 100644 Samples/Selection/Selector Tooptip sample/Selector Tooltip/Properties/AssemblyInfo.cs create mode 100644 Samples/Selection/Selector Tooptip sample/Selector Tooltip/Properties/Resources.Designer.cs create mode 100644 Samples/Selection/Selector Tooptip sample/Selector Tooltip/Properties/Resources.resx create mode 100644 Samples/Selection/Selector Tooptip sample/Selector Tooltip/Properties/Settings.Designer.cs create mode 100644 Samples/Selection/Selector Tooptip sample/Selector Tooltip/Properties/Settings.settings create mode 100644 Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_462.csproj create mode 100644 Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_462.sln create mode 100644 Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_60.csproj create mode 100644 Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_60.sln create mode 100644 Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_80.csproj create mode 100644 Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_80.sln diff --git a/Samples/Automatic Layout/Custom DataSource/CustomDataSource/App.config b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/App.config new file mode 100644 index 00000000..b50c74f3 --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Samples/Automatic Layout/Custom DataSource/CustomDataSource/App.xaml b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/App.xaml new file mode 100644 index 00000000..3debb701 --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/Samples/Automatic Layout/Custom DataSource/CustomDataSource/App.xaml.cs b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/App.xaml.cs new file mode 100644 index 00000000..edb78d71 --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/App.xaml.cs @@ -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 CustomDataSource +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_462.csproj b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_462.csproj new file mode 100644 index 00000000..8363de8c --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_462.csproj @@ -0,0 +1,109 @@ + + + + + Debug + AnyCPU + {2115284A-6B1C-4173-A879-60D9C9BE7981} + WinExe + CustomDataSource + CustomDataSource + v4.6.2 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + 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 + + + Designer + MSBuild:Compile + + + + + + NodeCreate.xaml + + + 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/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_462.sln b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_462.sln new file mode 100644 index 00000000..85c5fb65 --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_462.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34309.116 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomDataSource_462", "CustomDataSource_462.csproj", "{2115284A-6B1C-4173-A879-60D9C9BE7981}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2115284A-6B1C-4173-A879-60D9C9BE7981}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2115284A-6B1C-4173-A879-60D9C9BE7981}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2115284A-6B1C-4173-A879-60D9C9BE7981}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2115284A-6B1C-4173-A879-60D9C9BE7981}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {954FCF8B-1BCA-464B-8668-AFA06414EF5F} + EndGlobalSection +EndGlobal diff --git a/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_60.csproj b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_60.csproj new file mode 100644 index 00000000..907ce5ad --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_60.csproj @@ -0,0 +1,109 @@ + + + WinExe + net6.0-windows + true + true + False + false + false + CustomDataSource + CustomDataSource + + + TRACE;NET50 + + + TRACE;NET50 + + + TRACE;NET50 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + + + MSBuild:Compile + + + \ No newline at end of file diff --git a/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_60.csproj.user b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_60.csproj.user new file mode 100644 index 00000000..44d2149a --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_60.csproj.user @@ -0,0 +1,12 @@ + + + + + + Designer + + + Designer + + + \ No newline at end of file diff --git a/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_60.sln b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_60.sln new file mode 100644 index 00000000..3d130a13 --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_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}") = "CustomDataSource_60", "CustomDataSource_60.csproj", "{2115284A-6B1C-4173-A879-60D9C9BE7981}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2115284A-6B1C-4173-A879-60D9C9BE7981}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2115284A-6B1C-4173-A879-60D9C9BE7981}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2115284A-6B1C-4173-A879-60D9C9BE7981}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2115284A-6B1C-4173-A879-60D9C9BE7981}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {954FCF8B-1BCA-464B-8668-AFA06414EF5F} + EndGlobalSection +EndGlobal diff --git a/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_80.csproj b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_80.csproj new file mode 100644 index 00000000..6117ffaa --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_80.csproj @@ -0,0 +1,109 @@ + + + WinExe + net8.0-windows + true + true + False + false + false + CustomDataSource + CustomDataSource + + + TRACE;NET50 + + + TRACE;NET50 + + + TRACE;NET50 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + + + MSBuild:Compile + + + \ No newline at end of file diff --git a/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_80.csproj.user b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_80.csproj.user new file mode 100644 index 00000000..44d2149a --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_80.csproj.user @@ -0,0 +1,12 @@ + + + + + + Designer + + + Designer + + + \ No newline at end of file diff --git a/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_80.sln b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_80.sln new file mode 100644 index 00000000..fb045378 --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/CustomDataSource_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}") = "CustomDataSource_80", "CustomDataSource_80.csproj", "{2115284A-6B1C-4173-A879-60D9C9BE7981}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2115284A-6B1C-4173-A879-60D9C9BE7981}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2115284A-6B1C-4173-A879-60D9C9BE7981}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2115284A-6B1C-4173-A879-60D9C9BE7981}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2115284A-6B1C-4173-A879-60D9C9BE7981}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {954FCF8B-1BCA-464B-8668-AFA06414EF5F} + EndGlobalSection +EndGlobal diff --git a/Samples/Automatic Layout/Custom DataSource/CustomDataSource/MainWindow.xaml b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/MainWindow.xaml new file mode 100644 index 00000000..6c1a1bb0 --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/MainWindow.xaml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/Automatic Layout/Custom DataSource/CustomDataSource/MainWindow.xaml.cs b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/MainWindow.xaml.cs new file mode 100644 index 00000000..eff435f5 --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/MainWindow.xaml.cs @@ -0,0 +1,433 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO.Packaging; +using System.Linq; +using System.Reflection.Emit; +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; +using System.Xml.Linq; +using CustomDataSource.Model; +using Syncfusion.UI.Xaml.Diagram; +using Syncfusion.UI.Xaml.Diagram.Controls; +using Syncfusion.UI.Xaml.Diagram.Serializer; +using Syncfusion.Windows.Shared; + +namespace CustomDataSource +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + diagram.Nodes = new NodeCollection(); + diagram.Connectors = new ConnectorCollection(); + diagram.HorizontalRuler = new Ruler(); + diagram.VerticalRuler = new Ruler() { Orientation = Orientation.Vertical }; + (diagram.Info as IGraphInfo).ViewPortChangedEvent += MainWindow_ViewPortChangedEvent; + + } + + private void MainWindow_ViewPortChangedEvent(object sender, ChangeEventArgs args) + { + if (diagram.IsLoaded) + { + diagram.ViewPortCentreX = args.NewValue.ViewPort.Width / 2; + diagram.ViewPortCentreY = args.NewValue.ViewPort.Y; + } + } + + private void diagram_Loaded(object sender, RoutedEventArgs e) + { + diagram.CustomData = GetData(); + + CustomUpdateLayout(); + + (diagram.Info as IGraphInfo).Commands.FitToPage.Execute(null); + } + + #region Helper Methods + + private void CustomUpdateLayout() + { + SetLevelForNodeData(); + + CreateDiagramUsingData(); + + UpdatePosition(); + + CreateConnection(); + } + + /// + /// Set the DataItems for the Layout. + /// + private DataItems GetData() + { + DataItems ItemsInfo = new DataItems(); + + ItemsInfo.Add(new ItemInfo() + { + Id = "1", + Name = "Start", + Text = "1", + }); + + ItemsInfo.Add(new ItemInfo() + { + Id = "2", + Name = "Invoice Entry", + ParentId = new List { "1" }, + Text = "1", + }); + + ItemsInfo.Add(new ItemInfo() + { + Id = "3", + Name = "Confirm Payment Received", + ParentId = new List { "1" }, + BranchDirection = "Right", + Text = "1", + }); + + ItemsInfo.Add(new ItemInfo() + { + Id = "4", + + Name = "Check Customer Payment", + ParentId = new List { "2" }, + Text = "1", + + }); + ItemsInfo.Add(new ItemInfo() + { + Id = "5", + + Name = "Credit Memo Entry", + ParentId = new List { "4" }, + Text = "1", + + }); + ItemsInfo.Add(new ItemInfo() + { + Id = "6", + Name = "Refund Customer", + ParentId = new List { "5" }, + Text = "1", + + }); + ItemsInfo.Add(new ItemInfo() + { + Id = "8", + Name = "Refund with standard Voucher", + ParentId = new List { "3" }, + + Text = "5", + + }); + ItemsInfo.Add(new ItemInfo() + { + Id = "9", + Name = "Complete Payment Customer Memo", + ParentId = new List { "8" }, + Text = "5", + + }); + ItemsInfo.Add(new ItemInfo() + { + Id = "10", + Name = "Reject", + ParentId = new List { "9" }, + BranchDirection = "Right", + Text = "4", + + }); + ItemsInfo.Add(new ItemInfo() + { + Id = "11", + Name = "Approve Invoice", + ParentId = new List { "9" }, + Text = "5", + + }); + ItemsInfo.Add(new ItemInfo() + { + Id = "12", + Name = "Credit Memo Creation", + ParentId = new List { "11" }, + Text = "1", + + + }); + ItemsInfo.Add(new ItemInfo() + { + Id = "13", + Name = "Fill Credit Memo", + ParentId = new List { "12" }, + Text = "1", + + }); + ItemsInfo.Add(new ItemInfo() + { + Id = "14", + Name = "Re-Issuing the invoice", + ParentId = new List { "13", "6" }, + BranchDirection = "Left", + Text = "1", + }); + ItemsInfo.Add(new ItemInfo() + { + Id = "15", + Name = "End", + ParentId = new List { "14" }, + Text = "4", + }); + return ItemsInfo; + } + + /// + /// Set Level for each nodes to render them based on the level used to position the nodes. + /// + private void SetLevelForNodeData() + { + foreach (ItemInfo parentItem in diagram.CustomData as IEnumerable) + { + if ((parentItem as ItemInfo).ParentId == null) + { + (parentItem as ItemInfo).level = "Root"; + } + else + { + foreach (var parent in (parentItem as ItemInfo).ParentId) + { + foreach (ItemInfo childItem in diagram.CustomData as IEnumerable) + { + if ((childItem as ItemInfo).Id == parent) + { + if ((childItem as ItemInfo).level == "Root") + { + (parentItem as ItemInfo).level = "Level1"; + } + else + { + string substring = (childItem as ItemInfo).level.Substring(5); + int substringvalue = int.Parse(substring); + substringvalue += 1; + (parentItem as ItemInfo).level = "Level" + substringvalue.ToString(); + + } + } + } + } + } + } + } + + /// + /// Create Node based on the Data. + /// + private void CreateDiagramUsingData() + { + foreach (ItemInfo item in diagram.CustomData as IEnumerable) + { + NodeViewModel node = new NodeViewModel() + { + UnitHeight = 60, + UnitWidth = 250, + Content = item, + }; + + if (node != null) + { + if ((node.Content as ItemInfo).Id.Equals("1") || (node.Content as ItemInfo).Id.ToString().Equals("15")) + { + //Updating content template to the start and end nodes + node.ContentTemplate = Application.Current.MainWindow.Resources["EllipseNodeContentTemplate"] as DataTemplate; + } + else + { + //Updating content template to the node + + node.ContentTemplate = Application.Current.MainWindow.Resources["newCretedNode"] as DataTemplate; + } + } + + (diagram.Nodes as NodeCollection).Add(node); + } + } + + /// + /// Update the positions for the nodes + /// + private void UpdatePosition() + { + foreach(NodeViewModel node in diagram.Nodes as IEnumerable) + { + if ((node.Content as ItemInfo).ParentId == null) + { + node.OffsetX = diagram.ViewPortCentreX; + node.OffsetY = diagram.ViewPortCentreY + 100; + } + else + { + + foreach (NodeViewModel nodes in diagram.Nodes as IEnumerable) + { + List ParentIDs = new List(); + string ParentID = string.Empty; + foreach (var parentID in (node.Content as ItemInfo).ParentId) + { + ParentIDs.Add(int.Parse(parentID.ToString())); + ParentID = ParentIDs.Max().ToString(); + } + + //This condition for update the offset value for the node from the parent node. + if (ParentID == ((nodes as NodeViewModel).Content as ItemInfo).Id) + { + if ((node.Content as ItemInfo).BranchDirection == "Right") + { + node.OffsetX = (nodes as NodeViewModel).OffsetX + ((nodes as NodeViewModel).UnitWidth / 2) + diagram.HorizontalSpacing + (node.UnitWidth / 2); + node.OffsetY = (nodes as NodeViewModel).OffsetY + ((nodes as NodeViewModel).UnitHeight / 2) + diagram.VerticalSpacing + (node.UnitHeight / 2); + } + else if ((node.Content as ItemInfo).BranchDirection == "Left") + { + node.OffsetX = (nodes as NodeViewModel).OffsetX - ((nodes as NodeViewModel).UnitWidth / 2) - diagram.HorizontalSpacing - (node.UnitWidth / 2); + node.OffsetY = (nodes as NodeViewModel).OffsetY + ((nodes as NodeViewModel).UnitHeight / 2) + diagram.VerticalSpacing + (node.UnitHeight / 2); + } + else + { + node.OffsetX = (nodes as NodeViewModel).OffsetX; + node.OffsetY = (nodes as NodeViewModel).OffsetY + ((nodes as NodeViewModel).UnitHeight / 2) + diagram.VerticalSpacing + (node.UnitHeight / 2); + } + } + } + } + + } + } + + /// + /// Create the connection between the nodes + /// + private void CreateConnection() + { + foreach (NodeViewModel node in diagram.Nodes as IEnumerable) + { + node.ID = (node.Content as ItemInfo).Id; + if ((node.Content as ItemInfo).ParentId != null) + { + foreach (var ParentID in (node.Content as ItemInfo).ParentId) + { + ConnectorViewModel nodeToNodeConnection = new ConnectorViewModel() + { + + SourceNodeID = ParentID, + TargetNodeID = (node.Content as ItemInfo).Id, + Annotations = new ObservableCollection() + { + new AnnotationEditorViewModel() + { + Content="1" + } + } + }; + + (diagram.Connectors as ConnectorCollection).Add(nodeToNodeConnection); + + } + } + } + } + + #endregion + } + + public class CustomDiagram : SfDiagram + { + private DataItems _customData; + private double _horizontalSpacing = 60; + private double _verticalSpacing = 100; + private double _viewPortCentreX = 0; + private double _viewPortCentreY = 0; + + public DataItems CustomData + { + get + { + return _customData; + } + set + { + _customData = value; + OnPropertyChanged(nameof(CustomData)); + } + } + + + + public double HorizontalSpacing + { + get + { + return _horizontalSpacing; + } + set + { + _horizontalSpacing = value; + OnPropertyChanged(nameof(HorizontalSpacing)); + } + } + + public double VerticalSpacing + { + get + { + return _verticalSpacing; + } + set + { + _verticalSpacing = value; + OnPropertyChanged(nameof(VerticalSpacing)); + } + } + + public double ViewPortCentreX + { + get + { + return _viewPortCentreX; + } + set + { + _viewPortCentreX = value; + OnPropertyChanged(nameof(ViewPortCentreX)); + } + } + + public double ViewPortCentreY + { + get + { + return _viewPortCentreY; + } + set + { + _viewPortCentreY = value; + OnPropertyChanged(nameof(ViewPortCentreY)); + } + } + } +} + diff --git a/Samples/Automatic Layout/Custom DataSource/CustomDataSource/Model/ItemInfo.cs b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/Model/ItemInfo.cs new file mode 100644 index 00000000..68f54ee9 --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/Model/ItemInfo.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; + +namespace CustomDataSource.Model +{ + public class ItemInfo + { + private string _shape; + private double _width = 250; + private double _height = 60; + public ItemInfo() + { + + } + + public string Id { get; set; } + public string Name { get; set; } + + public string Label { get; set; } + public List ParentId { get; set; } + public string _Shape { + get + { + return _shape; + } + set + { + _shape = value; + + } + } + public double Height + { + get + { + return _height; + } + set { _height = value; } + } + public double Width + { + get + { + return _width; + } + set { _width = value; } + } + + public string level { get; set; } + + public string BranchDirection { get; set; } + public object Text { get; set; } + } + public class DataItems : ObservableCollection + { + + } +} diff --git a/Samples/Automatic Layout/Custom DataSource/CustomDataSource/NodeCreate.xaml b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/NodeCreate.xaml new file mode 100644 index 00000000..1f8d0721 --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/NodeCreate.xaml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Samples/Automatic Layout/Custom DataSource/CustomDataSource/NodeCreate.xaml.cs b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/NodeCreate.xaml.cs new file mode 100644 index 00000000..df7e93af --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/NodeCreate.xaml.cs @@ -0,0 +1,50 @@ +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 CustomDataSource +{ + /// + /// Interaction logic for NodeCreate.xaml + /// + public partial class NodeCreate : UserControl + { + public NodeCreate() + { + InitializeComponent(); + var ellipseBrush = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#4382FF")); + var ellipsesCount = 4; + var initialEllipseDiameter = 70; + var diameterStep = 25; + var opacityStep = 1d / ellipsesCount; + + for (int i = 0; i < ellipsesCount; i++) + { + var size = initialEllipseDiameter + (diameterStep * i); + var ellipse = new Ellipse() + { + Width = size, + Height = size, + Fill = new SolidColorBrush(ellipseBrush.Color) { Opacity = 1 - (i * opacityStep) } + }; + ellipsesPanel.Children.Insert(0, ellipse); + } + + var ellipsesWidth = ellipsesPanel.Children.OfType().Max(x => x.Width); + var offset = (ellipsesWidth / 2) - (mainEllipse.Width / 2); + Canvas.SetLeft(ellipsesPanel, -offset); + Canvas.SetTop(ellipsesPanel, -offset); + } + } +} diff --git a/Samples/Automatic Layout/Custom DataSource/CustomDataSource/Properties/AssemblyInfo.cs b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..18f88f86 --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/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("CustomDataSource")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CustomDataSource")] +[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 +//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/Automatic Layout/Custom DataSource/CustomDataSource/Properties/Resources.Designer.cs b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/Properties/Resources.Designer.cs new file mode 100644 index 00000000..09b5c605 --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 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 CustomDataSource.Properties +{ + + + /// + /// 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", "4.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 ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CustomDataSource.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/Automatic Layout/Custom DataSource/CustomDataSource/Properties/Resources.resx b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/Properties/Resources.resx new file mode 100644 index 00000000..af7dbebb --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/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/Automatic Layout/Custom DataSource/CustomDataSource/Properties/Settings.Designer.cs b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/Properties/Settings.Designer.cs new file mode 100644 index 00000000..432e5526 --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 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 CustomDataSource.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.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/Automatic Layout/Custom DataSource/CustomDataSource/Properties/Settings.settings b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/Properties/Settings.settings new file mode 100644 index 00000000..033d7a5e --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/CustomDataSource/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Samples/Automatic Layout/Custom DataSource/README.md b/Samples/Automatic Layout/Custom DataSource/README.md new file mode 100644 index 00000000..f9990ff9 --- /dev/null +++ b/Samples/Automatic Layout/Custom DataSource/README.md @@ -0,0 +1,17 @@ +# Custom Data Source Sample +This sample demonstrate How to create a Custom layout. + +[WPF Diagram](https://www.syncfusion.com/wpf-controls/diagram) (SfDiagram) can be populated with the [nodes](https://help.syncfusion.com/cr/wpf/Syncfusion.SfDiagram.WPF~Syncfusion.UI.Xaml.Diagram.NodeViewModel.html) and [connectors](https://help.syncfusion.com/cr/wpf/Syncfusion.SfDiagram.WPF~Syncfusion.UI.Xaml.Diagram.ConnectorViewModel.html) based on the information provided from an external data source. The [DataSource](https://help.syncfusion.com/cr/wpf/Syncfusion.SfDiagram.WPF~Syncfusion.UI.Xaml.Diagram.DataSourceSettings~DataSource.html) property is used to define the data source either as a collection of any business objects or collection of Nodes. Here, diagram is generated as layout with DataSource as NodeViewModel. + +__*Documentation*__: https://help.syncfusion.com/wpf/diagram/automatic-layouts#hierarchical-tree-layout + +## 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. + +K diff --git a/Samples/Selection/Node Selection/README.md b/Samples/Selection/Node Selection/README.md new file mode 100644 index 00000000..cd094b19 --- /dev/null +++ b/Samples/Selection/Node Selection/README.md @@ -0,0 +1,5 @@ +# How to customize the Selector in WPF Diagram (SfDiagram)? + +[WPF Diagram](https://www.syncfusion.com/wpf-controls/diagram) provides support to customize the Selector. This can be achieved by overriding the style of the Selector. + + diff --git a/Samples/Selection/Node Selection/Test/App.config b/Samples/Selection/Node Selection/Test/App.config new file mode 100644 index 00000000..f5876937 --- /dev/null +++ b/Samples/Selection/Node Selection/Test/App.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/Selection/Node Selection/Test/App.xaml b/Samples/Selection/Node Selection/Test/App.xaml new file mode 100644 index 00000000..d0fd4423 --- /dev/null +++ b/Samples/Selection/Node Selection/Test/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/Samples/Selection/Node Selection/Test/App.xaml.cs b/Samples/Selection/Node Selection/Test/App.xaml.cs new file mode 100644 index 00000000..2d0bcc64 --- /dev/null +++ b/Samples/Selection/Node Selection/Test/App.xaml.cs @@ -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 Test +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/Samples/Selection/Node Selection/Test/MainWindow.xaml b/Samples/Selection/Node Selection/Test/MainWindow.xaml new file mode 100644 index 00000000..3b65412b --- /dev/null +++ b/Samples/Selection/Node Selection/Test/MainWindow.xaml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/Selection/Node Selection/Test/MainWindow.xaml.cs b/Samples/Selection/Node Selection/Test/MainWindow.xaml.cs new file mode 100644 index 00000000..42cea692 --- /dev/null +++ b/Samples/Selection/Node Selection/Test/MainWindow.xaml.cs @@ -0,0 +1,117 @@ +using Syncfusion.UI.Xaml.Diagram; +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 Test +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } + + public class CustomDiagram : SfDiagram + { + protected override Selector GetSelectorForItemOverride(object item) + { + //Assigning custom selector to the diagram + CustomSelector selector = new CustomSelector(); + return selector; + } + } + public class CustomSelector : Selector + { + //Method for get the Out Neighbors + private void GetOutNeighbors(INode firstSelect, INode lastSelect, List neighbors) + { + if (firstSelect != null && lastSelect != null && firstSelect != lastSelect) + { + var outNeighbors = (firstSelect.Info as INodeInfo).OutNeighbors as IEnumerable; + foreach (INode neighbor in outNeighbors) + { + neighbors.Add(neighbor); + GetOutNeighbors(neighbor, lastSelect, neighbors); + } + } + } + + //Method for get the In Neighbors + private void GetInNeighbors(INode firstSelect, INode lastSelect, List neighbors) + { + if (firstSelect != null && lastSelect != null && firstSelect != lastSelect) + { + var inNeighbors = (firstSelect.Info as INodeInfo).InNeighbors as IEnumerable; + foreach (INode neighbor in inNeighbors) + { + neighbors.Add(neighbor); + GetInNeighbors(neighbor, lastSelect, neighbors); + } + } + } + + protected override void PointerSelection(PointerSelectionArgs args) + { + //Ensured the shift key press + bool isShiftPressed = Keyboard.IsKeyDown(System.Windows.Input.Key.LeftShift) || Keyboard.IsKeyDown(System.Windows.Input.Key.RightShift); + if (isShiftPressed) + { + var vm = this.DataContext as SelectorViewModel; + if ((vm != null && vm.SelectedItem == null) || !(args.Source is INode && !(args.Source is IGroup))) + { + base.PointerSelection(args); + } + else + { + //Get the first selected item in the diagram + var firstSelect = vm.SelectedItem as INode; + + //Get the last selected item + var lastSelect = args.Source as INode; + var neighbors = new List() { firstSelect }; + GetOutNeighbors(firstSelect, lastSelect, neighbors); + if (neighbors.Count > 1 && neighbors.Last() == lastSelect) + { + foreach(var neighbor in neighbors) + { + neighbor.IsSelected = true; + } + } + else + { + neighbors = new List() { firstSelect }; + GetInNeighbors(firstSelect, lastSelect, neighbors); + if (neighbors.Count > 1 && neighbors.Last() == lastSelect) + { + foreach (var neighbor in neighbors) + { + neighbor.IsSelected = true; + } + } + } + } + } + else + { + base.PointerSelection(args); + } + } + + } +} diff --git a/Samples/Selection/Node Selection/Test/Properties/AssemblyInfo.cs b/Samples/Selection/Node Selection/Test/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..b0345c18 --- /dev/null +++ b/Samples/Selection/Node Selection/Test/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("Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Test")] +[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 +//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/Selection/Node Selection/Test/Properties/Resources.Designer.cs b/Samples/Selection/Node Selection/Test/Properties/Resources.Designer.cs new file mode 100644 index 00000000..20274860 --- /dev/null +++ b/Samples/Selection/Node Selection/Test/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 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 Test.Properties +{ + + + /// + /// 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", "4.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 ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Test.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/Selection/Node Selection/Test/Properties/Resources.resx b/Samples/Selection/Node Selection/Test/Properties/Resources.resx new file mode 100644 index 00000000..af7dbebb --- /dev/null +++ b/Samples/Selection/Node Selection/Test/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/Selection/Node Selection/Test/Properties/Settings.Designer.cs b/Samples/Selection/Node Selection/Test/Properties/Settings.Designer.cs new file mode 100644 index 00000000..d24a8912 --- /dev/null +++ b/Samples/Selection/Node Selection/Test/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 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 Test.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.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/Selection/Node Selection/Test/Properties/Settings.settings b/Samples/Selection/Node Selection/Test/Properties/Settings.settings new file mode 100644 index 00000000..033d7a5e --- /dev/null +++ b/Samples/Selection/Node Selection/Test/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Samples/Selection/Node Selection/Test/Test_462.csproj b/Samples/Selection/Node Selection/Test/Test_462.csproj new file mode 100644 index 00000000..6cd6a610 --- /dev/null +++ b/Samples/Selection/Node Selection/Test/Test_462.csproj @@ -0,0 +1,102 @@ + + + + + Debug + AnyCPU + {DCD24AB3-3092-4E04-9372-E99B895B410C} + WinExe + Test + Test + v4.8 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + 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/Selection/Node Selection/Test/Test_462.sln b/Samples/Selection/Node Selection/Test/Test_462.sln new file mode 100644 index 00000000..37dcfd53 --- /dev/null +++ b/Samples/Selection/Node Selection/Test/Test_462.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34309.116 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_462", "Test_462.csproj", "{DCD24AB3-3092-4E04-9372-E99B895B410C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DCD24AB3-3092-4E04-9372-E99B895B410C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCD24AB3-3092-4E04-9372-E99B895B410C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCD24AB3-3092-4E04-9372-E99B895B410C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCD24AB3-3092-4E04-9372-E99B895B410C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {61D9F4DF-C12A-4FCC-95AD-9D9E7D219656} + EndGlobalSection +EndGlobal diff --git a/Samples/Selection/Node Selection/Test/Test_60.csproj b/Samples/Selection/Node Selection/Test/Test_60.csproj new file mode 100644 index 00000000..f949462b --- /dev/null +++ b/Samples/Selection/Node Selection/Test/Test_60.csproj @@ -0,0 +1,105 @@ + + + WinExe + net6.0-windows + true + true + False + false + false + Test + Test + + + TRACE;NET50 + + + TRACE;NET50 + + + TRACE;NET50 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + + + \ No newline at end of file diff --git a/Samples/Selection/Node Selection/Test/Test_60.sln b/Samples/Selection/Node Selection/Test/Test_60.sln new file mode 100644 index 00000000..029254fe --- /dev/null +++ b/Samples/Selection/Node Selection/Test/Test_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}") = "Test_60", "Test_60.csproj", "{DCD24AB3-3092-4E04-9372-E99B895B410C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DCD24AB3-3092-4E04-9372-E99B895B410C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCD24AB3-3092-4E04-9372-E99B895B410C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCD24AB3-3092-4E04-9372-E99B895B410C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCD24AB3-3092-4E04-9372-E99B895B410C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {61D9F4DF-C12A-4FCC-95AD-9D9E7D219656} + EndGlobalSection +EndGlobal diff --git a/Samples/Selection/Node Selection/Test/Test_80.csproj b/Samples/Selection/Node Selection/Test/Test_80.csproj new file mode 100644 index 00000000..4804426a --- /dev/null +++ b/Samples/Selection/Node Selection/Test/Test_80.csproj @@ -0,0 +1,105 @@ + + + WinExe + net8.0-windows + true + true + False + false + false + Test + Test + + + TRACE;NET50 + + + TRACE;NET50 + + + TRACE;NET50 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + + + \ No newline at end of file diff --git a/Samples/Selection/Node Selection/Test/Test_80.sln b/Samples/Selection/Node Selection/Test/Test_80.sln new file mode 100644 index 00000000..0bf2566f --- /dev/null +++ b/Samples/Selection/Node Selection/Test/Test_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}") = "Test_80", "Test_80.csproj", "{DCD24AB3-3092-4E04-9372-E99B895B410C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DCD24AB3-3092-4E04-9372-E99B895B410C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCD24AB3-3092-4E04-9372-E99B895B410C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCD24AB3-3092-4E04-9372-E99B895B410C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCD24AB3-3092-4E04-9372-E99B895B410C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {61D9F4DF-C12A-4FCC-95AD-9D9E7D219656} + EndGlobalSection +EndGlobal diff --git a/Samples/Selection/Selector Tooptip sample/README.md b/Samples/Selection/Selector Tooptip sample/README.md new file mode 100644 index 00000000..4c7212cf --- /dev/null +++ b/Samples/Selection/Selector Tooptip sample/README.md @@ -0,0 +1,7 @@ +# How to customize the Selector in WPF Diagram (SfDiagram)? + +This sample explains how to display selector tooltip closer to the Node and Smaller. + +[WPF Diagram](https://www.syncfusion.com/wpf-controls/diagram) provides support to customize the Selector. This can be achieved by overriding the style of the Selector. + + diff --git a/Samples/Selection/Selector Tooptip sample/Selector Tooltip/App.config b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/App.config new file mode 100644 index 00000000..b50c74f3 --- /dev/null +++ b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Samples/Selection/Selector Tooptip sample/Selector Tooltip/App.xaml b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/App.xaml new file mode 100644 index 00000000..f358a213 --- /dev/null +++ b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/Samples/Selection/Selector Tooptip sample/Selector Tooltip/App.xaml.cs b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/App.xaml.cs new file mode 100644 index 00000000..04ace5af --- /dev/null +++ b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/App.xaml.cs @@ -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 Selector_Tooltip +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/Samples/Selection/Selector Tooptip sample/Selector Tooltip/MainWindow.xaml b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/MainWindow.xaml new file mode 100644 index 00000000..72dbb9c0 --- /dev/null +++ b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/MainWindow.xaml @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + 1 + + + + + + + + + 8 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/Selection/Selector Tooptip sample/Selector Tooltip/MainWindow.xaml.cs b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/MainWindow.xaml.cs new file mode 100644 index 00000000..5e715d71 --- /dev/null +++ b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/MainWindow.xaml.cs @@ -0,0 +1,44 @@ +using Syncfusion.UI.Xaml.Diagram; +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 Selector_Tooltip +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + + Diagram.Nodes = new NodeCollection(); + + NodeViewModel node = new NodeViewModel() + { + UnitHeight = 100, + UnitWidth = 100, + OffsetX = 100, + OffsetY = 100, + Shape = new RectangleGeometry() { Rect = new Rect(10, 10, 10, 10) }, + }; + + (Diagram.Nodes as NodeCollection).Add(node); + + (Diagram.SelectedItems as SelectorViewModel).SelectorConstraints = (Diagram.SelectedItems as SelectorViewModel).SelectorConstraints.Remove(SelectorConstraints.Rotator,SelectorConstraints.Resizer); + } + } +} diff --git a/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Properties/AssemblyInfo.cs b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..f4fd120e --- /dev/null +++ b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/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("Selector Tooltip")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Selector Tooltip")] +[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 +//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/Selection/Selector Tooptip sample/Selector Tooltip/Properties/Resources.Designer.cs b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Properties/Resources.Designer.cs new file mode 100644 index 00000000..af748da9 --- /dev/null +++ b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 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 Selector_Tooltip.Properties +{ + + + /// + /// 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", "4.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 ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Selector_Tooltip.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/Selection/Selector Tooptip sample/Selector Tooltip/Properties/Resources.resx b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Properties/Resources.resx new file mode 100644 index 00000000..af7dbebb --- /dev/null +++ b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/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/Selection/Selector Tooptip sample/Selector Tooltip/Properties/Settings.Designer.cs b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Properties/Settings.Designer.cs new file mode 100644 index 00000000..299d2739 --- /dev/null +++ b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 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 Selector_Tooltip.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.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/Selection/Selector Tooptip sample/Selector Tooltip/Properties/Settings.settings b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Properties/Settings.settings new file mode 100644 index 00000000..033d7a5e --- /dev/null +++ b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_462.csproj b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_462.csproj new file mode 100644 index 00000000..dc9ecddd --- /dev/null +++ b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_462.csproj @@ -0,0 +1,102 @@ + + + + + Debug + AnyCPU + {FF93AFAF-9D25-4D94-BD8E-808B14A38A20} + WinExe + Selector_Tooltip + Selector Tooltip + v4.6.2 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + 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/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_462.sln b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_462.sln new file mode 100644 index 00000000..63e385e3 --- /dev/null +++ b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_462.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34309.116 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Selector Tooltip_462", "Selector Tooltip_462.csproj", "{FF93AFAF-9D25-4D94-BD8E-808B14A38A20}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FF93AFAF-9D25-4D94-BD8E-808B14A38A20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF93AFAF-9D25-4D94-BD8E-808B14A38A20}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF93AFAF-9D25-4D94-BD8E-808B14A38A20}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF93AFAF-9D25-4D94-BD8E-808B14A38A20}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {54981427-4CD8-4699-8D3B-0696CE400444} + EndGlobalSection +EndGlobal diff --git a/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_60.csproj b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_60.csproj new file mode 100644 index 00000000..a5e787de --- /dev/null +++ b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_60.csproj @@ -0,0 +1,64 @@ + + + WinExe + net6.0-windows + true + true + False + false + false + Selector Tooltip + Selector_Tooltip + + + TRACE;NET50 + + + TRACE;NET50 + + + TRACE;NET50 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_60.sln b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_60.sln new file mode 100644 index 00000000..aef78e3f --- /dev/null +++ b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_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}") = "Selector Tooltip_60", "Selector Tooltip_60.csproj", "{FF93AFAF-9D25-4D94-BD8E-808B14A38A20}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FF93AFAF-9D25-4D94-BD8E-808B14A38A20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF93AFAF-9D25-4D94-BD8E-808B14A38A20}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF93AFAF-9D25-4D94-BD8E-808B14A38A20}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF93AFAF-9D25-4D94-BD8E-808B14A38A20}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {54981427-4CD8-4699-8D3B-0696CE400444} + EndGlobalSection +EndGlobal diff --git a/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_80.csproj b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_80.csproj new file mode 100644 index 00000000..fdd0a99b --- /dev/null +++ b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_80.csproj @@ -0,0 +1,64 @@ + + + WinExe + net8.0-windows + true + true + False + false + false + Selector Tooltip + Selector_Tooltip + + + TRACE;NET50 + + + TRACE;NET50 + + + TRACE;NET50 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_80.sln b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_80.sln new file mode 100644 index 00000000..1556e8a4 --- /dev/null +++ b/Samples/Selection/Selector Tooptip sample/Selector Tooltip/Selector Tooltip_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}") = "Selector Tooltip_80", "Selector Tooltip_80.csproj", "{FF93AFAF-9D25-4D94-BD8E-808B14A38A20}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FF93AFAF-9D25-4D94-BD8E-808B14A38A20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF93AFAF-9D25-4D94-BD8E-808B14A38A20}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF93AFAF-9D25-4D94-BD8E-808B14A38A20}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF93AFAF-9D25-4D94-BD8E-808B14A38A20}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {54981427-4CD8-4699-8D3B-0696CE400444} + EndGlobalSection +EndGlobal