From 9da872cd934c6e34f879d72d3dbcccf7352c9971 Mon Sep 17 00:00:00 2001 From: SatishRaj4377 <158574671+SatishRaj4377@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:19:13 +0530 Subject: [PATCH 1/2] WPF-915840-Added CTRL Drag Duplicate Diisable Sample --- .../CTRL+DragDuplicationDisable/App.config | 6 + .../CTRL+DragDuplicationDisable/App.xaml | 9 + .../CTRL+DragDuplicationDisable/App.xaml.cs | 17 ++ .../CtrlDragDisableDuplication_462.csproj | 104 +++++++++ .../CtrlDragDisableDuplication_462.sln | 22 ++ .../CtrlDragDisableDuplication_60.csproj | 69 ++++++ .../CtrlDragDisableDuplication_60.sln | 21 ++ .../CtrlDragDisableDuplication_80.csproj | 69 ++++++ .../CtrlDragDisableDuplication_80.sln | 21 ++ .../CtrlDragDisableDuplication_90.csproj | 69 ++++++ .../CtrlDragDisableDuplication_90.sln | 21 ++ .../MainWindow.xaml | 187 +++++++++++++++ .../MainWindow.xaml.cs | 216 ++++++++++++++++++ .../Properties/AssemblyInfo.cs | 55 +++++ .../Properties/Resources.Designer.cs | 63 +++++ .../Properties/Resources.resx | 117 ++++++++++ .../Properties/Settings.Designer.cs | 26 +++ .../Properties/Settings.settings | 7 + 18 files changed, 1099 insertions(+) create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/App.config create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/App.xaml create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/App.xaml.cs create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_462.csproj create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_462.sln create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_60.csproj create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_60.sln create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_80.csproj create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_80.sln create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_90.csproj create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_90.sln create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/MainWindow.xaml create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/MainWindow.xaml.cs create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/Properties/AssemblyInfo.cs create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/Properties/Resources.Designer.cs create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/Properties/Resources.resx create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/Properties/Settings.Designer.cs create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/Properties/Settings.settings diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/App.config b/Samples/Commands/CTRL+DragDuplicationDisable/App.config new file mode 100644 index 00000000..4bfa0056 --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/App.xaml b/Samples/Commands/CTRL+DragDuplicationDisable/App.xaml new file mode 100644 index 00000000..f57bf5c5 --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/App.xaml.cs b/Samples/Commands/CTRL+DragDuplicationDisable/App.xaml.cs new file mode 100644 index 00000000..a473fd8c --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/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 Simple_SfDiagram_WPF +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_462.csproj b/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_462.csproj new file mode 100644 index 00000000..3134e7c3 --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_462.csproj @@ -0,0 +1,104 @@ + + + + + Debug + AnyCPU + {2D05EB05-E8C6-4327-9026-43BA588BAB16} + WinExe + Simple_SfDiagram_WPF + Simple SfDiagram WPF + 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/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_462.sln b/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_462.sln new file mode 100644 index 00000000..335d1e7e --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_462.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35506.116 d17.12 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CtrlDragDisableDuplication_462", "CtrlDragDisableDuplication_462.csproj", "{2D05EB05-E8C6-4327-9026-43BA588BAB16}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2D05EB05-E8C6-4327-9026-43BA588BAB16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D05EB05-E8C6-4327-9026-43BA588BAB16}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D05EB05-E8C6-4327-9026-43BA588BAB16}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D05EB05-E8C6-4327-9026-43BA588BAB16}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_60.csproj b/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_60.csproj new file mode 100644 index 00000000..0a9e1017 --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_60.csproj @@ -0,0 +1,69 @@ + + + WinExe + net6.0-windows + true + true + False + false + false + Simple SfDiagram WPF + Simple_SfDiagram_WPF + + + TRACE;NET50 + + + TRACE;NET50 + + + TRACE;NET50 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + + + \ No newline at end of file diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_60.sln b/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_60.sln new file mode 100644 index 00000000..42aef43d --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_60.sln @@ -0,0 +1,21 @@ +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}") = "CtrlDragDisableDuplication_60", "CtrlDragDisableDuplication_60.csproj", "{2D05EB05-E8C6-4327-9026-43BA588BAB16}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2D05EB05-E8C6-4327-9026-43BA588BAB16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D05EB05-E8C6-4327-9026-43BA588BAB16}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D05EB05-E8C6-4327-9026-43BA588BAB16}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D05EB05-E8C6-4327-9026-43BA588BAB16}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_80.csproj b/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_80.csproj new file mode 100644 index 00000000..fb23de6b --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_80.csproj @@ -0,0 +1,69 @@ + + + WinExe + net8.0-windows + true + true + False + false + false + Simple SfDiagram WPF + Simple_SfDiagram_WPF + + + TRACE;NET50 + + + TRACE;NET50 + + + TRACE;NET50 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + + + \ No newline at end of file diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_80.sln b/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_80.sln new file mode 100644 index 00000000..6f15af5b --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_80.sln @@ -0,0 +1,21 @@ +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}") = "CtrlDragDisableDuplication_80", "CtrlDragDisableDuplication_80.csproj", "{2D05EB05-E8C6-4327-9026-43BA588BAB16}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2D05EB05-E8C6-4327-9026-43BA588BAB16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D05EB05-E8C6-4327-9026-43BA588BAB16}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D05EB05-E8C6-4327-9026-43BA588BAB16}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D05EB05-E8C6-4327-9026-43BA588BAB16}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_90.csproj b/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_90.csproj new file mode 100644 index 00000000..6b60327f --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_90.csproj @@ -0,0 +1,69 @@ + + + WinExe + net9.0-windows + true + true + False + false + false + Simple SfDiagram WPF + Simple_SfDiagram_WPF + + + TRACE;NET50 + + + TRACE;NET50 + + + TRACE;NET50 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + + + \ No newline at end of file diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_90.sln b/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_90.sln new file mode 100644 index 00000000..8ded7e5e --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_90.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35017.193 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CtrlDragDisableDuplication_90", "CtrlDragDisableDuplication_90.csproj", "{2D05EB05-E8C6-4327-9026-43BA588BAB16}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2D05EB05-E8C6-4327-9026-43BA588BAB16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D05EB05-E8C6-4327-9026-43BA588BAB16}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D05EB05-E8C6-4327-9026-43BA588BAB16}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D05EB05-E8C6-4327-9026-43BA588BAB16}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/MainWindow.xaml b/Samples/Commands/CTRL+DragDuplicationDisable/MainWindow.xaml new file mode 100644 index 00000000..bb4d9ac7 --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/MainWindow.xaml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/MainWindow.xaml.cs b/Samples/Commands/CTRL+DragDuplicationDisable/MainWindow.xaml.cs new file mode 100644 index 00000000..6c1345ee --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/MainWindow.xaml.cs @@ -0,0 +1,216 @@ +using Syncfusion.UI.Xaml.Diagram; +using Syncfusion.UI.Xaml.Diagram.Controls; +using Syncfusion.UI.Xaml.Diagram.Layout; +using Syncfusion.UI.Xaml.Diagram.Serializer; +using Syncfusion.UI.Xaml.Diagram.Stencil; +using Syncfusion.UI.Xaml.Diagram.Theming; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.Data; +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; +using System.Xml.Linq; + +namespace Simple_SfDiagram_WPF +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + DiagramMenuItem menu = new DiagramMenuItem() + { + Content = "Duplicate", + Command = (Diagram.Info as IGraphInfo).Commands.Duplicate, + + }; + Diagram.Menu.MenuItems.Add(menu); + + + ObservableCollection nodes = new ObservableCollection(); + NodeViewModel node1 = new NodeViewModel() + { + UnitWidth = 100, + UnitHeight = 100, + OffsetX = 1000, + OffsetY = 450, + Content = "Node1", + Shape = new RectangleGeometry() { Rect = new Rect(0, 0, 10, 10) }, + ShapeStyle = this.Resources["ShapeStyle"] as Style + }; + NodeViewModel node2 = new NodeViewModel() + { + UnitWidth = 100, + UnitHeight = 100, + OffsetX = 1050, + OffsetY = 560, + Content="Node2", + Shape = new RectangleGeometry() { Rect = new Rect(0, 0, 10, 10) }, + ShapeStyle = this.Resources["ShapeStyle"] as Style + }; + + ObservableCollection group1 = new ObservableCollection(); + ContainerViewModel container = new ContainerViewModel() + { + UnitHeight=400, + UnitWidth=400, + OffsetX=1000, OffsetY=500, + Nodes = new ObservableCollection() + { + node1, + node2 + }, + }; + + container.Header = new ContainerHeaderViewModel() + { + UnitHeight = 40, + Annotation = new AnnotationEditorViewModel() + { + Content = "Container", + FontSize = 18, + FontWeight = FontWeights.Bold, + Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#343434")) + }, + }; + + group1.Add(container); + + this.Diagram.Groups = group1; + + + + + + + ObservableCollection node = new ObservableCollection(); + NodeViewModel node3 = new NodeViewModel() + { + UnitWidth = 100, + UnitHeight = 100, + OffsetX = 1250, + OffsetY = 100, + Content = "Node3", + Shape = new RectangleGeometry() { Rect = new Rect(0, 0, 10, 10) }, + ShapeStyle = this.Resources["ShapeStyle"] as Style + }; + NodeViewModel node4 = new NodeViewModel() + { + UnitWidth = 100, + UnitHeight = 100, + OffsetX = 1250, + OffsetY = 200, + Content = "Node1", + Shape = new RectangleGeometry() { Rect = new Rect(0, 0, 10, 10) }, + ShapeStyle = this.Resources["ShapeStyle"] as Style + }; + ConnectorViewModel connectorViewModel = new ConnectorViewModel() + { + SourcePoint = new Point(1350, 200), + TargetPoint = new Point(1400, 200), + + + }; + + GroupViewModel group = new GroupViewModel() + { + UnitHeight = 200, + UnitWidth = 200, + OffsetX = 1200, + OffsetY = 250, + Content = "Group", + Nodes = new ObservableCollection() + { + node3, + node4 + }, + Connectors = new ObservableCollection() + { + connectorViewModel + } + }; + + group1.Add(group); + Diagram.Groups = group1; + + + + (Diagram.Info as IGraphInfo).NodeChangedEvent += MainWindow_NodeChangedEvent; + (Diagram.Info as IGraphInfo).ItemSelectedEvent += MainWindow_ItemSelectedEvent; + (Diagram.Info as IGraphInfo).ItemUnSelectedEvent += MainWindow_ItemUnSelectedEvent; + (Diagram.Info as IGraphInfo).ItemAdded += MainWindow_ItemAdded; + (Diagram.Info as IGraphInfo).ItemAdding += MainWindow_ItemAdding; + (Diagram.Info as IGraphInfo).ItemSelectingEvent += MainWindow_ItemSelectingEvent; + (Diagram.Info as IGraphInfo).ItemUnSelectingEvent += MainWindow_ItemUnSelectingEvent; + + } + + + private void MainWindow_ItemUnSelectingEvent(object sender, DiagramPreviewEventArgs args) + { + + } + + private void MainWindow_ItemSelectingEvent(object sender, DiagramPreviewEventArgs args) + { + + } + + private void MainWindow_ItemAdding(object sender, Syncfusion.UI.Xaml.Diagram.ItemAddingEventArgs args) + { + + } + + private void MainWindow_ItemAdded(object sender, ItemAddedEventArgs args) + { + + } + + private void MainWindow_ItemUnSelectedEvent(object sender, DiagramEventArgs args) + { + + } + + private void MainWindow_ItemSelectedEvent(object sender, DiagramEventArgs args) + { + + } + + private void MainWindow_NodeChangedEvent(object sender, ChangeEventArgs args) + { + + } + + + } + public class ViewModel : SfDiagram + { + protected override bool CanExecuteCommand(ICommand command) + { + if (command == (Info as IGraphInfo).Commands.Duplicate) + { + if (Keyboard.Modifiers == ModifierKeys.Control) + { + return Keyboard.IsKeyDown(System.Windows.Input.Key.D); + } + } + + return true; + } + } +} diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/Properties/AssemblyInfo.cs b/Samples/Commands/CTRL+DragDuplicationDisable/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..94bc54f3 --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/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("Simple SfDiagram WPF")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Simple SfDiagram WPF")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[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/Commands/CTRL+DragDuplicationDisable/Properties/Resources.Designer.cs b/Samples/Commands/CTRL+DragDuplicationDisable/Properties/Resources.Designer.cs new file mode 100644 index 00000000..623677f2 --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/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 Simple_SfDiagram_WPF.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("Simple_SfDiagram_WPF.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/Commands/CTRL+DragDuplicationDisable/Properties/Resources.resx b/Samples/Commands/CTRL+DragDuplicationDisable/Properties/Resources.resx new file mode 100644 index 00000000..af7dbebb --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/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/Commands/CTRL+DragDuplicationDisable/Properties/Settings.Designer.cs b/Samples/Commands/CTRL+DragDuplicationDisable/Properties/Settings.Designer.cs new file mode 100644 index 00000000..b92a0b06 --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/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 Simple_SfDiagram_WPF.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.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/Commands/CTRL+DragDuplicationDisable/Properties/Settings.settings b/Samples/Commands/CTRL+DragDuplicationDisable/Properties/Settings.settings new file mode 100644 index 00000000..033d7a5e --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file From 840810bc8e3d41e93518ebac6f38f32b00232f37 Mon Sep 17 00:00:00 2001 From: SatishRaj4377 <158574671+SatishRaj4377@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:26:45 +0530 Subject: [PATCH 2/2] WPF-915840-Added Read Me --- .../{ => CTRL+DragDuplicationDisable}/App.config | 0 .../{ => CTRL+DragDuplicationDisable}/App.xaml | 0 .../{ => CTRL+DragDuplicationDisable}/App.xaml.cs | 0 .../CtrlDragDisableDuplication_462.csproj | 0 .../CtrlDragDisableDuplication_462.sln | 0 .../CtrlDragDisableDuplication_60.csproj | 0 .../CtrlDragDisableDuplication_60.sln | 0 .../CtrlDragDisableDuplication_80.csproj | 0 .../CtrlDragDisableDuplication_80.sln | 0 .../CtrlDragDisableDuplication_90.csproj | 0 .../CtrlDragDisableDuplication_90.sln | 0 .../MainWindow.xaml | 0 .../MainWindow.xaml.cs | 0 .../Properties/AssemblyInfo.cs | 0 .../Properties/Resources.Designer.cs | 0 .../Properties/Resources.resx | 0 .../Properties/Settings.Designer.cs | 0 .../Properties/Settings.settings | 0 .../Commands/CTRL+DragDuplicationDisable/README.md | 13 +++++++++++++ 19 files changed, 13 insertions(+) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/App.config (100%) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/App.xaml (100%) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/App.xaml.cs (100%) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/CtrlDragDisableDuplication_462.csproj (100%) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/CtrlDragDisableDuplication_462.sln (100%) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/CtrlDragDisableDuplication_60.csproj (100%) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/CtrlDragDisableDuplication_60.sln (100%) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/CtrlDragDisableDuplication_80.csproj (100%) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/CtrlDragDisableDuplication_80.sln (100%) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/CtrlDragDisableDuplication_90.csproj (100%) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/CtrlDragDisableDuplication_90.sln (100%) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/MainWindow.xaml (100%) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/MainWindow.xaml.cs (100%) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/Properties/AssemblyInfo.cs (100%) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/Properties/Resources.Designer.cs (100%) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/Properties/Resources.resx (100%) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/Properties/Settings.Designer.cs (100%) rename Samples/Commands/CTRL+DragDuplicationDisable/{ => CTRL+DragDuplicationDisable}/Properties/Settings.settings (100%) create mode 100644 Samples/Commands/CTRL+DragDuplicationDisable/README.md diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/App.config b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/App.config similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/App.config rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/App.config diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/App.xaml b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/App.xaml similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/App.xaml rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/App.xaml diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/App.xaml.cs b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/App.xaml.cs similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/App.xaml.cs rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/App.xaml.cs diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_462.csproj b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_462.csproj similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_462.csproj rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_462.csproj diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_462.sln b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_462.sln similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_462.sln rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_462.sln diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_60.csproj b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_60.csproj similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_60.csproj rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_60.csproj diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_60.sln b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_60.sln similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_60.sln rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_60.sln diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_80.csproj b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_80.csproj similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_80.csproj rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_80.csproj diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_80.sln b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_80.sln similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_80.sln rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_80.sln diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_90.csproj b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_90.csproj similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_90.csproj rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_90.csproj diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_90.sln b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_90.sln similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_90.sln rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/CtrlDragDisableDuplication_90.sln diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/MainWindow.xaml b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/MainWindow.xaml similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/MainWindow.xaml rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/MainWindow.xaml diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/MainWindow.xaml.cs b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/MainWindow.xaml.cs similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/MainWindow.xaml.cs rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/MainWindow.xaml.cs diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/Properties/AssemblyInfo.cs b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/Properties/AssemblyInfo.cs similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/Properties/AssemblyInfo.cs rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/Properties/AssemblyInfo.cs diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/Properties/Resources.Designer.cs b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/Properties/Resources.Designer.cs similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/Properties/Resources.Designer.cs rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/Properties/Resources.Designer.cs diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/Properties/Resources.resx b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/Properties/Resources.resx similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/Properties/Resources.resx rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/Properties/Resources.resx diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/Properties/Settings.Designer.cs b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/Properties/Settings.Designer.cs similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/Properties/Settings.Designer.cs rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/Properties/Settings.Designer.cs diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/Properties/Settings.settings b/Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/Properties/Settings.settings similarity index 100% rename from Samples/Commands/CTRL+DragDuplicationDisable/Properties/Settings.settings rename to Samples/Commands/CTRL+DragDuplicationDisable/CTRL+DragDuplicationDisable/Properties/Settings.settings diff --git a/Samples/Commands/CTRL+DragDuplicationDisable/README.md b/Samples/Commands/CTRL+DragDuplicationDisable/README.md new file mode 100644 index 00000000..639fd704 --- /dev/null +++ b/Samples/Commands/CTRL+DragDuplicationDisable/README.md @@ -0,0 +1,13 @@ +# Disabling ctrl + drag duplication behaviour in sample +This sample demonstrate how to disable the ctrl+drag duplication behaviour in sample. + +__*Documentation*__: https://help.syncfusion.com/wpf/diagram/commands#selecttool + +## 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.