Browse Source

Introduced "WPF Editor" option panel.

pull/632/head
Andreas Weizel 11 years ago
parent
commit
78165ec089
  1. 6
      data/resources/StringResources.resx
  2. 17
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptionPanel.xaml
  3. 35
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptionPanel.xaml.cs
  4. 40
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptions.cs
  5. 10
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.AddIn.csproj
  6. 7
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.addin

6
data/resources/StringResources.resx

@ -8440,4 +8440,10 @@ Press Esc to cancel this operation.</value> @@ -8440,4 +8440,10 @@ Press Esc to cancel this operation.</value>
<data name="Dialog.ProjectOptions.AssemblyInfo.None" xml:space="preserve">
<value>None</value>
</data>
<data name="ICSharpCode.WpfDesign.AddIn.Options.Title" xml:space="preserve">
<value>WPF Editor</value>
</data>
<data name="ICSharpCode.WpfDesign.AddIn.Options.EnableAppXamlParsing" xml:space="preserve">
<value>Enable App.xaml parsing</value>
</data>
</root>

17
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptionPanel.xaml

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
<gui:OptionPanel
x:Class="ICSharpCode.WpfDesign.AddIn.Options.WpfEditorOptionPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sd="http://icsharpcode.net/sharpdevelop/core"
xmlns:core="clr-namespace:ICSharpCode.Core.Presentation;assembly=ICSharpCode.Core.Presentation"
xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop"
xmlns:wpfdesign="clr-namespace:ICSharpCode.WpfDesign.AddIn.Options">
<Grid>
<CheckBox
Name="enableAppXamlParsingCheckBox"
Content="{core:Localize ICSharpCode.WpfDesign.AddIn.Options.EnableAppXamlParsing}"
IsChecked="{sd:OptionBinding wpfdesign:WpfEditorOptions.EnableAppXamlParsing}"
Margin="0,0,0,10" />
</Grid>
</gui:OptionPanel>

35
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptionPanel.xaml.cs

@ -0,0 +1,35 @@ @@ -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
{
/// <summary>
/// Interaction logic for WpfEditorOptionPanel.xaml
/// </summary>
public partial class WpfEditorOptionPanel : OptionPanel
{
public WpfEditorOptionPanel()
{
InitializeComponent();
}
}
}

40
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/Options/WpfEditorOptions.cs

@ -0,0 +1,40 @@ @@ -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
{
/// <summary>
/// Manages options of WpfDesign AddIn.
/// </summary>
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);
}
}
}
}

10
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.AddIn.csproj

@ -54,6 +54,10 @@ @@ -54,6 +54,10 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Src\Options\WpfEditorOptionPanel.xaml.cs">
<DependentUpon>WpfEditorOptionPanel.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Resource Include="Images\Icons.32x32.Error.png" />
<None Include="WpfDesign.addin">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
@ -68,6 +72,7 @@ @@ -68,6 +72,7 @@
<Compile Include="Src\Commands\Remove.cs" />
<Compile Include="Src\Commands\UndoRedo.cs" />
<Compile Include="Src\Commands\ViewXaml.cs" />
<Compile Include="Src\Options\WpfEditorOptions.cs" />
<Compile Include="Src\SharpDevelopTranslations.cs" />
<Compile Include="Src\ThumbnailViewPad.cs" />
<Compile Include="Src\FileUriContext.cs" />
@ -97,6 +102,7 @@ @@ -97,6 +102,7 @@
<Compile Include="Src\WpfViewContent.cs" />
</ItemGroup>
<ItemGroup>
<Page Include="Src\Options\WpfEditorOptionPanel.xaml" />
<Page Include="Src\WpfDocumentError.xaml" />
<ProjectReference Include="..\..\..\..\Libraries\NRefactory\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj">
<Project>{3B2A5653-EC97-4001-BB9B-D90F1AF2C371}</Project>
@ -147,5 +153,7 @@ @@ -147,5 +153,7 @@
<Page Include="Src\ImageSourceEditor\ImageSourceEditor.xaml" />
<Page Include="Src\ObjectEditor.xaml" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Folder Include="Src\Options" />
</ItemGroup>
</Project>

7
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/WpfDesign.addin

@ -72,4 +72,11 @@ @@ -72,4 +72,11 @@
<MenuItem id="properties" label="${res:ICSharpCode.WPFDesigner.ContextMenu.Properties}" icon="Icons.16x16.PropertiesIcon" shortcut="F4" class="ICSharpCode.WpfDesign.AddIn.Commands.Properties" />
<MenuItem id="outline" label="${res:ICSharpCode.WPFDesigner.ContextMenu.Outline}" icon="PadIcons.Toolbar" class="ICSharpCode.WpfDesign.AddIn.Commands.Outline" />
</Path>
<Path name="/SharpDevelop/Dialogs/OptionsDialog/TextEditorOptions">
<OptionPanel id = "WpfEditorOptionPanel"
insertafter = "XamlCompletionPanel"
label = "${res:ICSharpCode.WpfDesign.AddIn.Options.Title}"
class = "ICSharpCode.WpfDesign.AddIn.Options.WpfEditorOptionPanel" />
</Path>
</AddIn>
Loading…
Cancel
Save