From 78165ec089d010e597eecfefcf4b12958608bc1e Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Fri, 26 Dec 2014 22:18:58 +0100 Subject: [PATCH] Introduced "WPF Editor" option panel. --- data/resources/StringResources.resx | 6 +++ .../Src/Options/WpfEditorOptionPanel.xaml | 17 ++++++++ .../Src/Options/WpfEditorOptionPanel.xaml.cs | 35 ++++++++++++++++ .../Src/Options/WpfEditorOptions.cs | 40 +++++++++++++++++++ .../WpfDesign.AddIn/WpfDesign.AddIn.csproj | 10 ++++- .../WpfDesign/WpfDesign.AddIn/WpfDesign.addin | 7 ++++ 6 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptionPanel.xaml create mode 100644 src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptionPanel.xaml.cs create mode 100644 src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptions.cs diff --git a/data/resources/StringResources.resx b/data/resources/StringResources.resx index 9c4b48eb3a..73c2214799 100644 --- a/data/resources/StringResources.resx +++ b/data/resources/StringResources.resx @@ -8440,4 +8440,10 @@ Press Esc to cancel this operation. None + + WPF Editor + + + Enable App.xaml parsing + \ No newline at end of file diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptionPanel.xaml b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptionPanel.xaml new file mode 100644 index 0000000000..ec992dc754 --- /dev/null +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptionPanel.xaml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptionPanel.xaml.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptionPanel.xaml.cs new file mode 100644 index 0000000000..a37dc403af --- /dev/null +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptionPanel.xaml.cs @@ -0,0 +1,35 @@ +// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of this +// software and associated documentation files (the "Software"), to deal in the Software +// without restriction, including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons +// to whom the Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all copies or +// substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +using System; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Gui; + +namespace ICSharpCode.WpfDesign.AddIn.Options +{ + /// + /// Interaction logic for WpfEditorOptionPanel.xaml + /// + public partial class WpfEditorOptionPanel : OptionPanel + { + public WpfEditorOptionPanel() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptions.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptions.cs new file mode 100644 index 0000000000..9f16acdec8 --- /dev/null +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptions.cs @@ -0,0 +1,40 @@ +// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of this +// software and associated documentation files (the "Software"), to deal in the Software +// without restriction, including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons +// to whom the Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all copies or +// substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +using System; +using ICSharpCode.SharpDevelop; + +namespace ICSharpCode.WpfDesign.AddIn.Options +{ + /// + /// Manages options of WpfDesign AddIn. + /// + public static class WpfEditorOptions + { + const string EnableAppXamlParsingOptionName = "WpfDesign.EnableAppXamlParsing"; + + public static bool EnableAppXamlParsing { + get { + return SD.PropertyService.Get(EnableAppXamlParsingOptionName, false); + } + set { + SD.PropertyService.Set(EnableAppXamlParsingOptionName, value); + } + } + } +} diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.AddIn.csproj b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.AddIn.csproj index 54ca072d7a..6c99f67fa6 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.AddIn.csproj +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.AddIn.csproj @@ -54,6 +54,10 @@ + + WpfEditorOptionPanel.xaml + Code + Always @@ -68,6 +72,7 @@ + @@ -97,6 +102,7 @@ + {3B2A5653-EC97-4001-BB9B-D90F1AF2C371} @@ -147,5 +153,7 @@ - + + + \ No newline at end of file diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.addin b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.addin index 90edda34b7..4540eb15b7 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.addin +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.addin @@ -72,4 +72,11 @@ + + + + \ No newline at end of file