Browse Source

Make sure buttons have the correct size (using a style with MinWidth=75 and Padding=9,1).

Use UniformGridWithSpacing for layout of OK and Cancel buttons (these should have the same size even in languages where the OK button needs more space than 75 pixels).
Option Panels: give check boxes a bit more space

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@6147 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Daniel Grunwald 15 years ago
parent
commit
c9a780068a
  1. 5
      src/AddIns/Analysis/Profiler/Frontend/AddIn/Profiler.AddIn.csproj
  2. 18
      src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/Dialogs/ProfileExecutableForm.xaml
  3. 129
      src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/OptionPanels/General.xaml
  4. 3
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/InteractiveInterpreter.cs
  5. 2
      src/AddIns/BackendBindings/XamlBinding/XamlBinding/Options/CodeCompletion.xaml
  6. 41
      src/AddIns/BackendBindings/XamlBinding/XamlBinding/PowerToys/Dialogs/ExtractPropertiesAsStyleDialog.xaml
  7. 13
      src/AddIns/BackendBindings/XamlBinding/XamlBinding/PowerToys/Dialogs/SelectSourceClassDialog.xaml
  8. 5
      src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlBinding.csproj
  9. 10
      src/AddIns/Debugger/Debugger.AddIn/Service/EditBreakpointScriptWindow.xaml
  10. 4
      src/AddIns/Debugger/Debugger.AddIn/Visualizers/TextVisualizer/TextVisualizerWindow.xaml
  11. 21
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/ChooseEncodingDialog.xaml
  12. 106
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Commands/SortOptionsDialog.xaml
  13. 18
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/BehaviorOptions.xaml
  14. 6
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/GeneralEditorOptions.xaml
  15. 2
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/HighlightingOptions.xaml
  16. 6
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/TextViewOptions.xaml
  17. 11
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Snippets/SnippetOptionPanel.xaml
  18. 10
      src/AddIns/DisplayBindings/XmlEditor/Project/Src/SelectXmlSchemaWindow.xaml
  19. 9
      src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlSchemasPanel.xaml
  20. 5
      src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.csproj
  21. 5
      src/AddIns/Misc/SharpRefactoring/Project/SharpRefactoring.csproj
  22. 1
      src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/InsertCtorDialog.xaml
  23. 10
      src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/IntroduceMethodDialog.xaml
  24. 9
      src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/OverrideEqualsGetHashCodeMethodsDialog.xaml
  25. 9
      src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/OverrideToStringMethodDialog.xaml
  26. 2
      src/AddIns/Misc/StartPage/Project/Src/RecentProjectsControl.xaml
  27. 39
      src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/CollectedDataView.xaml
  28. 2
      src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/OptionPage.xaml
  29. 11
      src/Main/Base/Project/Src/Gui/Dialogs/AbstractOptionPanel.cs
  30. 38
      src/Main/Base/Project/Src/Gui/Dialogs/GotoDialog.xaml
  31. 9
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/LoadSaveOptions.xaml
  32. 11
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/ProjectAndSolutionOptions.xaml
  33. 38
      src/Main/Base/Project/Src/Gui/Dialogs/TabbedOptionsDialog.xaml
  34. 38
      src/Main/Base/Project/Src/Gui/Dialogs/TreeViewOptionsDialog.xaml
  35. 8
      src/Main/Base/Project/Src/Project/Converter/UpgradeView.xaml
  36. 24
      src/Main/ICSharpCode.Core.Presentation/GlobalStyles.cs
  37. 1
      src/Main/ICSharpCode.Core.Presentation/ICSharpCode.Core.Presentation.csproj
  38. 43
      src/Main/ICSharpCode.Core.Presentation/themes/generic.xaml
  39. 3
      src/Main/ICSharpCode.SharpDevelop.Widgets/Project/ICSharpCode.SharpDevelop.Widgets.csproj
  40. 2
      src/Main/ICSharpCode.SharpDevelop.Widgets/Project/RadioButtonGroup.cs
  41. 101
      src/Main/ICSharpCode.SharpDevelop.Widgets/Project/StackPanelWithSpacing.cs
  42. 70
      src/Main/ICSharpCode.SharpDevelop.Widgets/Project/UniformGridWithSpacing.cs
  43. 25
      src/Main/ICSharpCode.SharpDevelop.Widgets/Project/themes/generic.xaml

5
src/AddIns/Analysis/Profiler/Frontend/AddIn/Profiler.AddIn.csproj

@ -158,6 +158,11 @@ @@ -158,6 +158,11 @@
<Name>ICSharpCode.SharpDevelop.Dom</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\..\..\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj">
<Project>{8035765F-D51F-4A0C-A746-2FD100E19419}</Project>
<Name>ICSharpCode.SharpDevelop.Widgets</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\UnitTesting\UnitTesting.csproj">
<Project>{1F261725-6318-4434-A1B1-6C70CE4CD324}</Project>
<Name>UnitTesting</Name>

18
src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/Dialogs/ProfileExecutableForm.xaml

@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
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="http://icsharpcode.net/sharpdevelop/core"
xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"
Title="{sd:Localize AddIns.Profiler.ProfileExecutableForm.Title}" WindowStartupLocation="CenterScreen"
Style="{x:Static sd:GlobalStyles.DialogWindowStyle}"
WindowStyle="ToolWindow" ResizeMode="NoResize" SizeToContent="WidthAndHeight">
@ -27,9 +29,17 @@ @@ -27,9 +29,17 @@
<Button Margin="3" Padding="5,0,5,0" Grid.Column="2" Grid.Row="2" Click="btnSelectDirClick">...</Button>
<Label Grid.Row="3" Content="{sd:Localize AddIns.Profiler.ProfileExecutableForm.CmdLineArgsText}" />
<TextBox Margin="3" Name="txtArgs" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="3" />
<StackPanel Grid.ColumnSpan="3" Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Center">
<Button Margin="3" Padding="5,0,5,0" Click="btnStartClick" Content="{sd:Localize AddIns.Profiler.ProfileExecutableForm.StartText}" />
<Button Margin="3" Padding="5,0,5,0" Click="btnCancelClick" Content="{sd:Localize Global.CancelButtonText}" />
</StackPanel>
<widgets:UniformGridWithSpacing Columns="2" Grid.ColumnSpan="3" Grid.Row="4" HorizontalAlignment="Center" Margin="0,4,0,12">
<Button
Content="{core:Localize AddIns.Profiler.ProfileExecutableForm.StartText}"
IsDefault="True"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Click="btnStartClick" />
<Button
Content="{core:Localize Global.CancelButtonText}"
IsCancel="True"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Click="btnCancelClick" />
</widgets:UniformGridWithSpacing>
</Grid>
</Window>

129
src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/OptionPanels/General.xaml

@ -1,72 +1,63 @@ @@ -1,72 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<gui:OptionPanel
x:Class="ICSharpCode.Profiler.AddIn.OptionPanels.General"
xmlns:sd="http://icsharpcode.net/sharpdevelop/core"
xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:addin="clr-namespace:ICSharpCode.Profiler.AddIn.OptionPanels;assembly=ICSharpCode.Profiler.AddIn">
<StackPanel
Orientation="Vertical">
<GroupBox
Header="{sd:Localize AddIns.Profiler.Options.General.DataCollection.Header}">
<StackPanel
Orientation="Vertical">
<CheckBox
Margin="3"
IsChecked="{sd:OptionBinding addin:OptionWrapper.EnableDC}"
VerticalAlignment="Top">
<TextBlock
TextWrapping="Wrap"
Text="{sd:Localize AddIns.Profiler.Options.General.DataCollection.EnableDC}" />
</CheckBox>
<CheckBox
Margin="3"
IsChecked="{sd:OptionBinding addin:OptionWrapper.EnableDCAtStart}"
VerticalAlignment="Top">
<TextBlock
TextWrapping="Wrap"
Text="{sd:Localize AddIns.Profiler.Options.General.DataCollection.EnableDCAtStartup}" />
</CheckBox>
<Label
Margin="3"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Content="{sd:Localize AddIns.Profiler.Options.General.DataCollection.SizeOfStorageDescription}" />
<StackPanel
Margin="3"
Orientation="Horizontal">
<Slider
Name="sharedMemorySize"
Margin="3"
Width="100"
IsDirectionReversed="False"
TickPlacement="Both"
Minimum="64"
Maximum="512"
TickFrequency="64"
SmallChange="64"
Value="{sd:OptionBinding addin:OptionWrapper.SharedMemorySize}"
LargeChange="128"
IsSnapToTickEnabled="True"
VerticalAlignment="Top" />
<TextBlock
Margin="3"
HorizontalAlignment="Left"
Text="{Binding Value, ElementName=sharedMemorySize, StringFormat=\{0\} MB}"
VerticalAlignment="Center" />
</StackPanel>
<CheckBox
Margin="3"
IsChecked="{sd:OptionBinding addin:OptionWrapper.DoNotProfileNetInternals}"
VerticalAlignment="Top"
Content="{sd:Localize AddIns.Profiler.Options.General.DataCollection.DoNotProfileNetInternals}" />
<CheckBox
Margin="3"
IsChecked="{sd:OptionBinding addin:OptionWrapper.CombineRecursiveCalls}"
VerticalAlignment="Top"
Content="{sd:Localize AddIns.Profiler.Options.General.DataCollection.CombineRecursiveCalls}" />
</StackPanel>
</GroupBox>
</StackPanel>
x:Class="ICSharpCode.Profiler.AddIn.OptionPanels.General"
xmlns:sd="http://icsharpcode.net/sharpdevelop/core"
xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"
xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:addin="clr-namespace:ICSharpCode.Profiler.AddIn.OptionPanels;assembly=ICSharpCode.Profiler.AddIn">
<StackPanel
Orientation="Vertical">
<GroupBox
Header="{sd:Localize AddIns.Profiler.Options.General.DataCollection.Header}">
<widgets:StackPanelWithSpacing
Margin="3"
SpaceBetweenItems="5"
Orientation="Vertical">
<CheckBox
IsChecked="{sd:OptionBinding addin:OptionWrapper.EnableDC}"
VerticalAlignment="Top"
Content="{sd:Localize AddIns.Profiler.Options.General.DataCollection.EnableDC}" />
<CheckBox
IsChecked="{sd:OptionBinding addin:OptionWrapper.EnableDCAtStart}"
VerticalAlignment="Top"
Content="{sd:Localize AddIns.Profiler.Options.General.DataCollection.EnableDCAtStartup}" />
<Label
HorizontalAlignment="Left"
VerticalAlignment="Top"
Content="{sd:Localize AddIns.Profiler.Options.General.DataCollection.SizeOfStorageDescription}" />
<StackPanel
Orientation="Horizontal">
<Slider
Name="sharedMemorySize"
Margin="3"
Width="100"
IsDirectionReversed="False"
TickPlacement="Both"
Minimum="64"
Maximum="512"
TickFrequency="64"
SmallChange="64"
Value="{sd:OptionBinding addin:OptionWrapper.SharedMemorySize}"
LargeChange="128"
IsSnapToTickEnabled="True"
VerticalAlignment="Top" />
<TextBlock
Margin="3"
HorizontalAlignment="Left"
Text="{Binding Value, ElementName=sharedMemorySize, StringFormat=\{0\} MB}"
VerticalAlignment="Center" />
</StackPanel>
<CheckBox
IsChecked="{sd:OptionBinding addin:OptionWrapper.DoNotProfileNetInternals}"
VerticalAlignment="Top"
Content="{sd:Localize AddIns.Profiler.Options.General.DataCollection.DoNotProfileNetInternals}" />
<CheckBox
IsChecked="{sd:OptionBinding addin:OptionWrapper.CombineRecursiveCalls}"
VerticalAlignment="Top"
Content="{sd:Localize AddIns.Profiler.Options.General.DataCollection.CombineRecursiveCalls}" />
</widgets:StackPanelWithSpacing>
</GroupBox>
</StackPanel>
</gui:OptionPanel>

3
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/InteractiveInterpreter.cs

@ -71,7 +71,8 @@ namespace Grunwald.BooBinding @@ -71,7 +71,8 @@ namespace Grunwald.BooBinding
interpreter.LoopEval("import System\n" +
"import System.Collections.Generic\n" +
"import System.IO\n" +
"import System.Text");
"import System.Text\n" +
"import System.Linq.Enumerable");
}
processing = true;
try {

2
src/AddIns/BackendBindings/XamlBinding/XamlBinding/Options/CodeCompletion.xaml

@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Grid.ColumnSpan="2" Margin="3" Text="{sd:Localize AddIns.XamlBinding.Options.HighlightingDescription}" />
<TextBlock Grid.ColumnSpan="2" Margin="3" Text="{sd:Localize AddIns.XamlBinding.Options.HighlightingDescription}" TextWrapping="WrapWithOverflow" />
<Label Grid.Row="1" Content="{sd:Localize AddIns.XamlBinding.Options.PropertyColor}" />
<Label Grid.Row="2" Content="{sd:Localize AddIns.XamlBinding.Options.EventColor}" />
<Label Grid.Row="3" Content="{sd:Localize AddIns.XamlBinding.Options.NamespaceDeclarationColor}" />

41
src/AddIns/BackendBindings/XamlBinding/XamlBinding/PowerToys/Dialogs/ExtractPropertiesAsStyleDialog.xaml

@ -1,27 +1,22 @@ @@ -1,27 +1,22 @@
<Window x:Class="ICSharpCode.XamlBinding.PowerToys.Dialogs.ExtractPropertiesAsStyleDialog"
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"
Title="ICSharpCode.XamlBinding.PowerToys.Dialogs" Height="300" Width="500"
Style="{x:Static sd:GlobalStyles.DialogWindowStyle}"
WindowStyle="ToolWindow" WindowStartupLocation="CenterScreen">
<Window.Resources>
<Style TargetType="{x:Type Button}">
<Setter Property="Margin" Value="3" />
<Setter Property="Padding" Value="3" />
</Style>
</Window.Resources>
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:widgets="http://icsharpcode.net/sharpdevelop/widgets"
Title="ICSharpCode.XamlBinding.PowerToys.Dialogs" Height="300" Width="500"
Style="{x:Static sd:GlobalStyles.DialogWindowStyle}"
WindowStyle="ToolWindow" WindowStartupLocation="CenterScreen">
<DockPanel>
<DockPanel DockPanel.Dock="Top" Margin="5">
<Label Content="Style Name:" />
<TextBox x:Name="txtStyleName" />
</DockPanel>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom" Margin="5" HorizontalAlignment="Center">
<Button x:Name="btnOK" IsEnabled="False" Content="{sd:Localize Global.OKButtonText}" Click="BtnOKClick" />
<Button x:Name="btnCancel" Content="{sd:Localize Global.CancelButtonText}" Click="BtnCancelClick" />
</StackPanel>
<ListView x:Name="lvwProperties">
<ListView.View>
<widgets:UniformGridWithSpacing Columns="2" DockPanel.Dock="Bottom" Margin="5" HorizontalAlignment="Center">
<Button x:Name="btnOK" IsEnabled="False" Content="{sd:Localize Global.OKButtonText}" Click="BtnOKClick" Style="{x:Static sd:GlobalStyles.ButtonStyle}" />
<Button x:Name="btnCancel" Content="{sd:Localize Global.CancelButtonText}" Click="BtnCancelClick" Style="{x:Static sd:GlobalStyles.ButtonStyle}" />
</widgets:UniformGridWithSpacing>
<ListView x:Name="lvwProperties">
<ListView.View>
<GridView>
<GridViewColumn>
<GridViewColumn.CellTemplate>
@ -29,23 +24,23 @@ @@ -29,23 +24,23 @@
<CheckBox Name="chkSelected" Click="ChkSelectedClick" IsChecked="{Binding Selected}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridViewColumn>
<GridViewColumn Header="Property/Event Name">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding PropertyName}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="Property Value">
</GridViewColumn>
<GridViewColumn Header="Property Value">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding PropertyValue}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView.View>
</ListView>
</DockPanel>
</Window>

13
src/AddIns/BackendBindings/XamlBinding/XamlBinding/PowerToys/Dialogs/SelectSourceClassDialog.xaml

@ -3,14 +3,11 @@ @@ -3,14 +3,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ICSharpCode.XamlBinding.PowerToys.Dialogs"
xmlns:sd="http://icsharpcode.net/sharpdevelop/core"
xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"
Title="Select Source Class" Height="500" Width="700"
Style="{x:Static sd:GlobalStyles.DialogWindowStyle}"
WindowStartupLocation="CenterScreen" WindowStyle="ToolWindow">
<Window.Resources>
<Style TargetType="{x:Type Button}">
<Setter Property="Margin" Value="3" />
<Setter Property="Padding" Value="3" />
</Style>
<local:SelectionConverter x:Key="selectionConverter" />
</Window.Resources>
<DockPanel>
@ -18,10 +15,10 @@ @@ -18,10 +15,10 @@
<StatusBar DockPanel.Dock="Bottom">
<TextBlock Text="{Binding Items.Count, ElementName=lvClasses, StringFormat=Count: {0}}" />
</StatusBar>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom" HorizontalAlignment="Center">
<Button x:Name="btnOK" Content="{sd:Localize Global.OKButtonText}" Click="BtnOKClick" IsEnabled="{Binding SelectedIndex, ElementName=lvClasses, Converter={StaticResource selectionConverter}}" />
<Button x:Name="btnCancel" Content="{sd:Localize Global.CancelButtonText}" Click="BtnCancelClick" />
</StackPanel>
<widgets:UniformGridWithSpacing Columns="2" DockPanel.Dock="Bottom" HorizontalAlignment="Center" Margin="3">
<Button x:Name="btnOK" Content="{sd:Localize Global.OKButtonText}" Click="BtnOKClick" IsEnabled="{Binding SelectedIndex, ElementName=lvClasses, Converter={StaticResource selectionConverter}}" Style="{x:Static sd:GlobalStyles.ButtonStyle}" />
<Button x:Name="btnCancel" Content="{sd:Localize Global.CancelButtonText}" Click="BtnCancelClick" Style="{x:Static sd:GlobalStyles.ButtonStyle}" />
</widgets:UniformGridWithSpacing>
<TextBox Margin="3" DockPanel.Dock="Top" x:Name="txtFilter" TextChanged="TxtFilterTextChanged" />
<ListBox x:Name="lvClasses" Margin="3">
<ListBox.ItemTemplate>

5
src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlBinding.csproj

@ -179,6 +179,11 @@ @@ -179,6 +179,11 @@
<Name>ICSharpCode.SharpDevelop.Dom</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj">
<Project>{8035765F-D51F-4A0C-A746-2FD100E19419}</Project>
<Name>ICSharpCode.SharpDevelop.Widgets</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<!--<Target Name="AfterBuild">
<Copy SourceFiles="@(CopyFile)" DestinationFolder="$(OutputPath)" />

10
src/AddIns/Debugger/Debugger.AddIn/Service/EditBreakpointScriptWindow.xaml

@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Window x:Class="Debugger.AddIn.Service.EditBreakpointScriptWindow" xmlns:sd="http://icsharpcode.net/sharpdevelop/core" xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="{sd:Localize MainWindow.Windows.Debug.Conditional.Breakpoints.ScriptingWindow.Title}" Width="500" Style="{x:Static sd:GlobalStyles.DialogWindowStyle}" WindowStartupLocation="CenterScreen" Height="400">
<Window x:Class="Debugger.AddIn.Service.EditBreakpointScriptWindow" xmlns:sd="http://icsharpcode.net/sharpdevelop/core" xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets" xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="{sd:Localize MainWindow.Windows.Debug.Conditional.Breakpoints.ScriptingWindow.Title}" Width="500" Style="{x:Static sd:GlobalStyles.DialogWindowStyle}" WindowStartupLocation="CenterScreen" Height="400">
<DockPanel>
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
<Label Margin="3" Content="{sd:Localize MainWindow.Windows.Debug.Conditional.Breakpoints.ScriptingWindow.ScriptingLanguage}" />
<ComboBox Margin="3" Name="cmbLanguage" SelectionChanged="CmbLanguageSelectionChanged" />
<Button Margin="3" Name="btnCheckSyntax" Click="BtnCheckSyntaxClick" Content="{sd:Localize MainWindow.Windows.Debug.Conditional.Breakpoints.ScriptingWindow.CheckSyntax}" />
</StackPanel>
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Center">
<Button Name="btnOK" Margin="3" Content="{sd:Localize Global.OKButtonText}" Click="BtnOKClick" />
<Button Name="btnCancel" Margin="3" Content="{sd:Localize Global.CancelButtonText}" Click="BtnCancelClick" />
</StackPanel>
<widgets:UniformGridWithSpacing DockPanel.Dock="Bottom" Columns="2" HorizontalAlignment="Center" Margin="3">
<Button Name="btnOK" Content="{sd:Localize Global.OKButtonText}" Click="BtnOKClick" IsDefault="True" Style="{x:Static sd:GlobalStyles.ButtonStyle}" />
<Button Name="btnCancel" Content="{sd:Localize Global.CancelButtonText}" Click="BtnCancelClick" IsCancel="True" Style="{x:Static sd:GlobalStyles.ButtonStyle}" />
</widgets:UniformGridWithSpacing>
<avalonedit:TextEditor x:Name="codeEditor" />
</DockPanel>
</Window>

4
src/AddIns/Debugger/Debugger.AddIn/Visualizers/TextVisualizer/TextVisualizerWindow.xaml

@ -21,13 +21,13 @@ @@ -21,13 +21,13 @@
<Button
Name="btnCopy"
HorizontalAlignment="Left"
Padding="4 2"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Margin="4"
Click="BtnCopy_Click">Copy to clipboard</Button>
<Button
Name="btnClose"
HorizontalAlignment="Left"
Padding="4 2"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Margin="0 4"
Click="BtnClose_Click">Close</Button>
<CheckBox

21
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/ChooseEncodingDialog.xaml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Window
x:Class="ICSharpCode.AvalonEdit.AddIn.ChooseEncodingDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core"
x:Class="ICSharpCode.AvalonEdit.AddIn.ChooseEncodingDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"
Title="{core:Localize Dialog.Options.IDEOptions.TextEditor.General.FontGroupBox.FileEncodingGroupBox}"
Width="335"
SizeToContent="Height"
@ -20,24 +20,19 @@ @@ -20,24 +20,19 @@
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<StackPanel
Orientation="Horizontal"
<widgets:UniformGridWithSpacing
Columns="2"
Margin="4,4,10,10"
HorizontalAlignment="Right">
<Button
Content="{core:Localize Global.OKButtonText}"
Width="75"
Height="23"
Name="okButton"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
IsDefault="True"
Margin="4"
Click="okButton_Click" />
<Button
Content="{core:Localize Global.CancelButtonText}"
Width="75"
Height="23"
Name="cancelButton"
IsCancel="True"
Margin="4" />
</StackPanel>
Style="{x:Static core:GlobalStyles.ButtonStyle}"
IsCancel="True" />
</widgets:UniformGridWithSpacing>
</StackPanel>
</Window>

106
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Commands/SortOptionsDialog.xaml

@ -1,58 +1,54 @@ @@ -1,58 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<Window
x:Class="ICSharpCode.AvalonEdit.AddIn.Commands.SortOptionsDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:local="clr-namespace:ICSharpCode.AvalonEdit.AddIn.Commands"
Title="{core:Localize ICSharpCode.SharpDevelop.Gui.Dialogs.SortOptionsDialog.DialogName}"
Width="335"
SizeToContent="Height"
ResizeMode="NoResize"
WindowStartupLocation="CenterOwner"
Style="{x:Static core:GlobalStyles.DialogWindowStyle}">
<StackPanel
Margin="4">
<GroupBox
Header="{core:Localize ICSharpCode.SharpDevelop.Gui.Dialogs.SortOptionsDialog.SortDirectionGroupBox}">
<core:RadioButtonGroup
SelectedValue="{core:OptionBinding local:SortOptions.SortDirection}">
<RadioButton
Margin="4"
Tag="{x:Static local:SortDirection.Ascending}"
Content="{core:Localize ICSharpCode.SharpDevelop.Gui.Dialogs.SortOptionsDialog.SortDirectionGroupBox.Ascending}" />
<RadioButton
Margin="4"
Tag="{x:Static local:SortDirection.Descending}"
Content="{core:Localize ICSharpCode.SharpDevelop.Gui.Dialogs.SortOptionsDialog.SortDirectionGroupBox.Descending}" />
</core:RadioButtonGroup>
</GroupBox>
<CheckBox
Margin="4"
IsChecked="{core:OptionBinding local:SortOptions.RemoveDuplicates}"
Content="{core:Localize ICSharpCode.SharpDevelop.Gui.Dialogs.SortOptionsDialog.RemoveDuplicateLinesCheckBox}" />
<CheckBox
Margin="4"
IsChecked="{core:OptionBinding local:SortOptions.CaseSensitive}"
Content="{core:Localize ICSharpCode.SharpDevelop.Gui.Dialogs.SortOptionsDialog.CaseSensitiveCheckBox}" />
<CheckBox
Margin="4"
IsChecked="{core:OptionBinding local:SortOptions.IgnoreTrailingWhitespaces}"
Content="{core:Localize ICSharpCode.SharpDevelop.Gui.Dialogs.SortOptionsDialog.IgnoreTrailingWhitespacesCheckBox}" />
<StackPanel
Orientation="Horizontal"
HorizontalAlignment="Right">
<Button
Content="{core:Localize Global.OKButtonText}"
Width="75"
Height="23"
Name="okButton"
IsDefault="True"
Margin="4"
Click="okButton_Click" />
<Button
Content="{core:Localize Global.CancelButtonText}"
Width="75"
Height="23"
Name="cancelButton"
IsCancel="True"
Margin="4" />
</StackPanel>
</StackPanel>
x:Class="ICSharpCode.AvalonEdit.AddIn.Commands.SortOptionsDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:local="clr-namespace:ICSharpCode.AvalonEdit.AddIn.Commands" xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"
Title="{core:Localize ICSharpCode.SharpDevelop.Gui.Dialogs.SortOptionsDialog.DialogName}"
Width="335"
SizeToContent="Height"
ResizeMode="NoResize"
WindowStartupLocation="CenterOwner"
Style="{x:Static core:GlobalStyles.DialogWindowStyle}">
<StackPanel
Margin="4">
<GroupBox
Padding="3, 3, 3, 7"
Header="{core:Localize ICSharpCode.SharpDevelop.Gui.Dialogs.SortOptionsDialog.SortDirectionGroupBox}">
<widgets:RadioButtonGroup
SelectedValue="{core:OptionBinding local:SortOptions.SortDirection}">
<RadioButton
Tag="{x:Static local:SortDirection.Ascending}"
Content="{core:Localize ICSharpCode.SharpDevelop.Gui.Dialogs.SortOptionsDialog.SortDirectionGroupBox.Ascending}" />
<RadioButton
Tag="{x:Static local:SortDirection.Descending}"
Content="{core:Localize ICSharpCode.SharpDevelop.Gui.Dialogs.SortOptionsDialog.SortDirectionGroupBox.Descending}" />
</widgets:RadioButtonGroup>
</GroupBox>
<CheckBox
Margin="4"
IsChecked="{core:OptionBinding local:SortOptions.RemoveDuplicates}"
Content="{core:Localize ICSharpCode.SharpDevelop.Gui.Dialogs.SortOptionsDialog.RemoveDuplicateLinesCheckBox}" />
<CheckBox
Margin="4"
IsChecked="{core:OptionBinding local:SortOptions.CaseSensitive}"
Content="{core:Localize ICSharpCode.SharpDevelop.Gui.Dialogs.SortOptionsDialog.CaseSensitiveCheckBox}" />
<CheckBox
Margin="4"
IsChecked="{core:OptionBinding local:SortOptions.IgnoreTrailingWhitespaces}"
Content="{core:Localize ICSharpCode.SharpDevelop.Gui.Dialogs.SortOptionsDialog.IgnoreTrailingWhitespacesCheckBox}" />
<widgets:UniformGridWithSpacing
Columns="2"
Margin="4"
HorizontalAlignment="Right">
<Button
Content="{core:Localize Global.OKButtonText}"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Name="okButton"
IsDefault="True"
Click="okButton_Click" />
<Button
Content="{core:Localize Global.CancelButtonText}"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Name="cancelButton"
IsCancel="True" />
</widgets:UniformGridWithSpacing>
</StackPanel>
</Window>

18
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/BehaviorOptions.xaml

@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<gui:OptionPanel
x:Class="ICSharpCode.AvalonEdit.AddIn.Options.BehaviorOptions" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop" xmlns:local="clr-namespace:ICSharpCode.AvalonEdit.AddIn.Options">
x:Class="ICSharpCode.AvalonEdit.AddIn.Options.BehaviorOptions" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop" xmlns:local="clr-namespace:ICSharpCode.AvalonEdit.AddIn.Options"
xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets">
<StackPanel>
<GroupBox
Header="{core:Localize Dialog.Options.IDEOptions.TextEditor.Behaviour.TabsGroupBox}">
@ -9,21 +11,25 @@ @@ -9,21 +11,25 @@
Orientation="Horizontal">
<Label
Content="{core:Localize Dialog.Options.IDEOptions.TextEditor.Behaviour.IndentLabel}" />
<TextBox
Text="{core:OptionBinding local:CodeEditorOptions.IndentationSize}"
Width="40"/>
<widgets:NumericUpDown
Minimum="1"
Maximum="16"
Value="{core:OptionBinding local:CodeEditorOptions.IndentationSize}"
VerticalAlignment="Center"
Width="50"/>
</StackPanel>
<CheckBox
IsChecked="{core:OptionBinding local:CodeEditorOptions.ConvertTabsToSpaces}"
Content="{core:Localize Dialog.Options.IDEOptions.TextEditor.Behaviour.ConvertTabsToSpacesCheckBox}" />
<CheckBox
Margin="0,5,0,0"
IsChecked="{core:OptionBinding local:CodeEditorOptions.UseSmartIndentation}"
Content="{core:Localize Dialog.Options.IDEOptions.TextEditor.Behaviour.UseSmartIndent}" />
</StackPanel>
</GroupBox>
<GroupBox
Header="{core:Localize Dialog.Options.IDEOptions.TextEditor.Behaviour.BehaviourGroupBox}">
<StackPanel>
<widgets:StackPanelWithSpacing SpaceBetweenItems="5">
<CheckBox
IsChecked="{core:OptionBinding local:CodeEditorOptions.MouseWheelZoom}"
Content="{core:Localize Dialog.Options.IDEOptions.TextEditor.General.MouseWheelZoomCheckBoxCheckBox}" />
@ -33,7 +39,7 @@ @@ -33,7 +39,7 @@
<CheckBox
IsChecked="{core:OptionBinding local:CodeEditorOptions.CtrlClickGoToDefinition}"
Content="{core:Localize Dialog.Options.IDEOptions.TextEditor.Behaviour.CtrlClickGotoDefinition}" />
</StackPanel>
</widgets:StackPanelWithSpacing>
</GroupBox>
</StackPanel>
</gui:OptionPanel>

6
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/GeneralEditorOptions.xaml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<gui:OptionPanel
x:Class="ICSharpCode.AvalonEdit.AddIn.Options.GeneralEditorOptions" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:winforms="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration" xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop" xmlns:local="clr-namespace:ICSharpCode.AvalonEdit.AddIn.Options">
x:Class="ICSharpCode.AvalonEdit.AddIn.Options.GeneralEditorOptions" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:winforms="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration" xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop" xmlns:local="clr-namespace:ICSharpCode.AvalonEdit.AddIn.Options" xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets">
<StackPanel>
<GroupBox
Header="{core:Localize Dialog.Options.IDEOptions.TextEditor.General.FontGroupBox}">
@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
</GroupBox>
<GroupBox
Header="{core:Localize Dialog.Options.IDEOptions.TextEditor.General.GeneralOptionsGroupBox}">
<StackPanel>
<widgets:StackPanelWithSpacing SpaceBetweenItems="5">
<CheckBox
IsChecked="{core:OptionBinding local:CodeEditorOptions.WordWrap}"
Content="{core:Localize Dialog.Options.IDEOptions.OutputPanel.WordWrap}" />
@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
<CheckBox
IsChecked="{core:OptionBinding local:CodeEditorOptions.ShowLineNumbers}"
Content="{core:Localize Dialog.Options.IDEOptions.TextEditor.Markers.LineNumberCheckBox}" />
</StackPanel>
</widgets:StackPanelWithSpacing>
</GroupBox>
</StackPanel>
</gui:OptionPanel>

2
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/HighlightingOptions.xaml

@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
<CheckBox IsEnabled="{Binding CanSetFont}" IsChecked="{Binding Italic}"
Content="{core:Localize Dialog.HighlightingEditor.ColorDlg.Italic}"/>
<Button Name="resetButton" IsEnabled="{Binding IsCustomized}" HorizontalAlignment="Left"
Click="ResetButtonClick" Padding="8,0" Height="21" Margin="0,4"
Click="ResetButtonClick" Style="{x:Static core:GlobalStyles.ButtonStyle}" Margin="0,4"
Content="Reset" />
<Label Content="{core:StringParse ${res:Dialog.HighlightingEditor.SampleText}:}" />
<core:RestrictDesiredSize Height="50" MinWidth="200">

6
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/TextViewOptions.xaml

@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<gui:OptionPanel
x:Class="ICSharpCode.AvalonEdit.AddIn.Options.TextViewOptions" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop" xmlns:local="clr-namespace:ICSharpCode.AvalonEdit.AddIn.Options">
x:Class="ICSharpCode.AvalonEdit.AddIn.Options.TextViewOptions" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop" xmlns:local="clr-namespace:ICSharpCode.AvalonEdit.AddIn.Options" xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets">
<StackPanel>
<GroupBox
Header="{core:Localize Dialog.Options.IDEOptions.TextEditor.Markers.MarkersGroupBox}">
<StackPanel>
<widgets:StackPanelWithSpacing SpaceBetweenItems="5">
<CheckBox
IsChecked="{core:OptionBinding local:CodeEditorOptions.ShowSpaces}"
Content="{core:Localize Dialog.Options.IDEOptions.TextEditor.Markers.SpacesCheckBox}" />
@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
<CheckBox
IsChecked="{core:OptionBinding local:CodeEditorOptions.HighlightSymbol}"
Content="{core:Localize Dialog.Options.IDEOptions.TextEditor.Markers.HighlightSymbolCheckBox}" />
</StackPanel>
</widgets:StackPanelWithSpacing>
</GroupBox>
</StackPanel>
</gui:OptionPanel>

11
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Snippets/SnippetOptionPanel.xaml

@ -45,20 +45,17 @@ @@ -45,20 +45,17 @@
<Button
Content="{core:Localize Dialog.Options.CodeTemplate.AddGroupLabel}"
Margin="0,8,0,8"
Height="23"
Padding="9,1,9,1"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Click="AddGroupButton_Click" />
<Button
Content="{core:Localize Dialog.Options.CodeTemplate.RemoveGroupLabel}"
Margin="8,8,0,8"
Height="23"
Padding="9,1,9,1"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Click="RemoveGroupButton_Click" />
<Button
<Button
Content="{core:Localize Dialog.Options.CodeTemplate.EditGroupLabel}"
Margin="8,8,0,8"
Height="23"
Padding="9,1,9,1"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Click="EditGroupButton_Click" />
</StackPanel>
</Grid>

10
src/AddIns/DisplayBindings/XmlEditor/Project/Src/SelectXmlSchemaWindow.xaml

@ -2,13 +2,15 @@ @@ -2,13 +2,15 @@
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:widgets="http://icsharpcode.net/sharpdevelop/widgets"
Title="{sd:Localize ICSharpCode.XmlEditor.SelectXmlSchema.DialogTitle}" Height="365" Width="471"
Style="{x:Static sd:GlobalStyles.DialogWindowStyle}"
>
<DockPanel>
<StackPanel DockPanel.Dock="Bottom" Height="25" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Margin="3,0" Name="okbutton" Content="{sd:Localize Global.OKButtonText}" Click="OkButtonClick" IsDefault="True"/>
<Button Margin="3,0" Name="cancelButton" Content="{sd:Localize Global.CancelButtonText}" IsCancel="True"/>
</StackPanel>
<widgets:UniformGridWithSpacing DockPanel.Dock="Bottom" Columns="2" HorizontalAlignment="Right" Margin="0,4,10,10">
<Button Name="okbutton" Content="{sd:Localize Global.OKButtonText}" Click="OkButtonClick" IsDefault="True" Style="{x:Static sd:GlobalStyles.ButtonStyle}"/>
<Button Name="cancelButton" Content="{sd:Localize Global.CancelButtonText}" IsCancel="True" Style="{x:Static sd:GlobalStyles.ButtonStyle}"/>
</widgets:UniformGridWithSpacing>
<ListBox Margin="5" Name="schemaListBox" MouseDoubleClick="SchemaListBoxMouseDoubleClick"/>
</DockPanel>
</Window>

9
src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlSchemasPanel.xaml

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
<UserControl x:Class="ICSharpCode.XmlEditor.XmlSchemasPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:sd="http://icsharpcode.net/sharpdevelop/core"
xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<UserControl.Resources>
<Style TargetType="{x:Type ListBoxItem}">
@ -14,10 +15,10 @@ @@ -14,10 +15,10 @@
<StackPanel>
<GroupBox Header="{sd:Localize ICSharpCode.XmlEditor.XmlSchemaPanel.SchemasGroupBoxText}">
<DockPanel>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom" HorizontalAlignment="Right">
<Button Margin="3,0" Name="addSchemaButton" Content="{sd:StringParse ${res:Global.AddButtonText}...}" Click="AddSchemaButtonClick" />
<Button Margin="3,0" Name="removeSchemaButton" IsEnabled="False" Content="{sd:Localize Global.RemoveButtonText}" Click="RemoveSchemaButtonClick" />
</StackPanel>
<widgets:UniformGridWithSpacing Columns="2" DockPanel.Dock="Bottom" HorizontalAlignment="Right">
<Button Style="{x:Static sd:GlobalStyles.ButtonStyle}" Name="addSchemaButton" Content="{sd:StringParse ${res:Global.AddButtonText}...}" Click="AddSchemaButtonClick" />
<Button Style="{x:Static sd:GlobalStyles.ButtonStyle}" Name="removeSchemaButton" IsEnabled="False" Content="{sd:Localize Global.RemoveButtonText}" Click="RemoveSchemaButtonClick" />
</widgets:UniformGridWithSpacing>
<ListBox Name="schemaListBox" Height="100" Margin="5" SelectionChanged="SchemaListBoxSelectionChanged" />
</DockPanel>
</GroupBox>

5
src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.csproj

@ -219,5 +219,10 @@ @@ -219,5 +219,10 @@
<Name>ICSharpCode.SharpDevelop.Dom</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj">
<Project>{8035765F-D51F-4A0C-A746-2FD100E19419}</Project>
<Name>ICSharpCode.SharpDevelop.Widgets</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
</Project>

5
src/AddIns/Misc/SharpRefactoring/Project/SharpRefactoring.csproj

@ -165,5 +165,10 @@ @@ -165,5 +165,10 @@
<Name>ICSharpCode.SharpDevelop.Dom</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj">
<Project>{8035765F-D51F-4A0C-A746-2FD100E19419}</Project>
<Name>ICSharpCode.SharpDevelop.Widgets</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
</Project>

1
src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/InsertCtorDialog.xaml

@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<gui:AbstractInlineRefactorDialog.Resources>
<gui:IntToBoolConverter x:Key="intToBoolConverter" />
<Style TargetType="Button" BasedOn="{x:Static sd:GlobalStyles.ButtonStyle}"/>
</gui:AbstractInlineRefactorDialog.Resources>
<DockPanel Cursor="Arrow">
<TextBlock DockPanel.Dock="Top" Margin="3"

10
src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/IntroduceMethodDialog.xaml

@ -4,13 +4,15 @@ @@ -4,13 +4,15 @@
xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui"
xmlns:addin="clr-namespace:ICSharpCode.SharpDevelop.Refactoring"
xmlns:sd="http://icsharpcode.net/sharpdevelop/core"
xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"
WindowStartupLocation="CenterScreen" WindowStyle="ToolWindow" ResizeMode="NoResize"
Style="{x:Static sd:GlobalStyles.DialogWindowStyle}"
Title="{sd:Localize Dialog.Refactoring.IntroduceMethod.Title}" Height="400" Width="600">
<DockPanel>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom" HorizontalAlignment="Center">
<Button Content="{sd:Localize Global.OKButtonText}" Margin="3" Click="OKButtonClick" IsDefault="True" />
<Button Content="{sd:Localize Global.CancelButtonText}" Margin="3" Click="CancelButtonClick" IsCancel="True" />
</StackPanel>
<widgets:UniformGridWithSpacing Columns="2" DockPanel.Dock="Bottom" Margin="3" HorizontalAlignment="Center">
<Button Content="{sd:Localize Global.OKButtonText}" Click="OKButtonClick" Style="{x:Static sd:GlobalStyles.ButtonStyle}" />
<Button Content="{sd:Localize Global.CancelButtonText}" Click="CancelButtonClick" Style="{x:Static sd:GlobalStyles.ButtonStyle}" />
</widgets:UniformGridWithSpacing>
<TextBlock Text="{sd:Localize Dialog.Refactoring.IntroduceMethod.Description}" DockPanel.Dock="Top" Margin="3" TextWrapping="Wrap" />
<Grid>
<Grid.RowDefinitions>

9
src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/OverrideEqualsGetHashCodeMethodsDialog.xaml

@ -4,12 +4,13 @@ @@ -4,12 +4,13 @@
xmlns:gui="clr-namespace:SharpRefactoring.Gui"
xmlns:addin="clr-namespace:SharpRefactoring"
xmlns:sd="http://icsharpcode.net/sharpdevelop/core"
xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DockPanel Cursor="Arrow">
<StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom">
<Button Content="{sd:Localize Global.OKButtonText}" Margin="3" Click="OKButtonClick" />
<Button Content="{sd:Localize Global.CancelButtonText}" Margin="3" Click="CancelButtonClick" />
</StackPanel>
<widgets:UniformGridWithSpacing Columns="2" DockPanel.Dock="Bottom" Margin="3" HorizontalAlignment="Center">
<Button Content="{sd:Localize Global.OKButtonText}" Click="OKButtonClick" Style="{x:Static sd:GlobalStyles.ButtonStyle}" />
<Button Content="{sd:Localize Global.CancelButtonText}" Click="CancelButtonClick" Style="{x:Static sd:GlobalStyles.ButtonStyle}" />
</widgets:UniformGridWithSpacing>
<StackPanel Orientation="Vertical">
<!-- TODO : remove Visibilty="Collapsed" -->
<CheckBox

9
src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/OverrideToStringMethodDialog.xaml

@ -3,15 +3,16 @@ @@ -3,15 +3,16 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:local="clr-namespace:SharpRefactoring.Gui"
xmlns:sd="http://icsharpcode.net/sharpdevelop/core"
xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DockPanel Cursor="Arrow">
<TextBlock DockPanel.Dock="Top" Margin="3"
Text="{sd:Localize AddIns.SharpRefactoring.OverrideToStringMethod.Description}"
TextWrapping="Wrap" />
<StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom">
<Button Content="{sd:Localize Global.OKButtonText}" Margin="3" Click="OKButtonClick" />
<Button Content="{sd:Localize Global.CancelButtonText}" Margin="3" Click="CancelButtonClick" />
</StackPanel>
<widgets:UniformGridWithSpacing Columns="2" Margin="3" DockPanel.Dock="Bottom" HorizontalAlignment="Center">
<Button Content="{sd:Localize Global.OKButtonText}" Click="OKButtonClick" Style="{x:Static sd:GlobalStyles.ButtonStyle}" />
<Button Content="{sd:Localize Global.CancelButtonText}" Click="CancelButtonClick" Style="{x:Static sd:GlobalStyles.ButtonStyle}" />
</widgets:UniformGridWithSpacing>
<ListBox Margin="4" x:Name="listBox" />
</DockPanel>
</local:AbstractInlineRefactorDialog>

2
src/AddIns/Misc/StartPage/Project/Src/RecentProjectsControl.xaml

@ -42,9 +42,11 @@ @@ -42,9 +42,11 @@
<StackPanel
Orientation="Horizontal">
<Button
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Content="{core:Localize StartPage.StartMenu.OpenCombineButton}"
Click="openSolutionClick" />
<Button
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Content="{core:Localize StartPage.StartMenu.NewCombineButton}"
Click="newSolutionClick"
Margin="8,0,0,0" />

39
src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/CollectedDataView.xaml

@ -1,22 +1,23 @@ @@ -1,22 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Window
x:Class="ICSharpCode.UsageDataCollector.CollectedDataView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit"
Style="{x:Static core:GlobalStyles.DialogWindowStyle}"
Title="Collected Data"
Width="649"
Height="418">
<DockPanel>
<TextBlock
DockPanel.Dock="Top">This window shows the data that was collected but not yet uploaded.</TextBlock>
<Button
DockPanel.Dock="Bottom"
Width="75"
Height="23"
Content="{core:Localize Global.CloseButtonText}"
Margin="16,8,16,8"
Click="Button_Click" />
<avalonEdit:TextEditor
x:Name="textEditor"
IsReadOnly="True" />
</DockPanel>
x:Class="ICSharpCode.UsageDataCollector.CollectedDataView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit"
Style="{x:Static core:GlobalStyles.DialogWindowStyle}"
Title="Collected Data"
Width="649"
Height="418">
<DockPanel>
<TextBlock
TextWrapping="WrapWithOverflow"
DockPanel.Dock="Top">This window shows the data that was collected but not yet uploaded.</TextBlock>
<Button
DockPanel.Dock="Bottom"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
IsCancel="True"
Content="{core:Localize Global.CloseButtonText}"
Margin="16,8,16,8"
Click="Button_Click" />
<avalonEdit:TextEditor
x:Name="textEditor"
IsReadOnly="True" />
</DockPanel>
</Window>

2
src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/OptionPage.xaml

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
<RadioButton
Name="declineRadio"
Content="{core:Localize AddIns.UsageDataCollector.DeclineRadioButton}"/>
<Button Name="showCollectedDataButton" Click="ShowCollectedDataButton_Click" Margin="4" HorizontalAlignment="Left" Content="{core:Localize AddIns.UsageDataCollector.ShowCollectedData}"/>
<Button Name="showCollectedDataButton" Click="ShowCollectedDataButton_Click" Margin="4" HorizontalAlignment="Left" Content="{core:Localize AddIns.UsageDataCollector.ShowCollectedData}" Style="{x:Static core:GlobalStyles.ButtonStyle}" />
<TextBlock HorizontalAlignment="Left">
<Hyperlink
NavigateUri="{x:Static local:AnalyticsMonitor.PrivacyStatementUrl}">

11
src/Main/Base/Project/Src/Gui/Dialogs/AbstractOptionPanel.cs

@ -27,6 +27,17 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -27,6 +27,17 @@ namespace ICSharpCode.SharpDevelop.Gui
new FrameworkPropertyMetadata(new Thickness(2, 0, 4, 0)));
}
public OptionPanel()
{
this.Resources.Add(
typeof(GroupBox),
new Style(typeof(GroupBox)) { Setters = {
new Setter(GroupBox.PaddingProperty, new Thickness(3, 3, 3, 7))
}});
this.Resources.Add(typeof(CheckBox), GlobalStyles.WordWrapCheckBoxStyle);
this.Resources.Add(typeof(RadioButton), GlobalStyles.WordWrapCheckBoxStyle);
}
public virtual object Owner { get; set; }
readonly List<OptionBinding> bindings = new List<OptionBinding>();

38
src/Main/Base/Project/Src/Gui/Dialogs/GotoDialog.xaml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"
x:Class="ICSharpCode.SharpDevelop.Gui.GotoDialog"
Title="{core:Localize Dialog.Goto.DialogName}"
Height="298"
@ -41,28 +41,20 @@ @@ -41,28 +41,20 @@
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Button
Content="{core:Localize Global.OKButtonText}"
Grid.Column="0"
Grid.Row="3"
HorizontalAlignment="Right"
VerticalAlignment="Stretch"
Margin="0,6,117,8"
Width="100"
IsDefault="True"
Name="okButton"
Click="okButtonClick" />
<Button
Content="{core:Localize Global.CancelButtonText}"
Grid.Column="0"
Grid.Row="3"
HorizontalAlignment="Right"
VerticalAlignment="Stretch"
Margin="0,6,8,8"
Width="100"
IsCancel="True"
Name="cancelButton"
Click="cancelButtonClick" />
<widgets:UniformGridWithSpacing Columns="2" Grid.Column="0" Grid.Row="3" HorizontalAlignment="Right" Margin="0,4,12,12">
<Button
Content="{core:Localize Global.OKButtonText}"
IsDefault="True"
Name="okButton"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Click="okButtonClick" />
<Button
Content="{core:Localize Global.CancelButtonText}"
IsCancel="True"
Name="cancelButton"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Click="cancelButtonClick" />
</widgets:UniformGridWithSpacing>
<Grid.RowDefinitions>
<RowDefinition
Height="Auto" />

9
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/LoadSaveOptions.xaml

@ -3,21 +3,22 @@ @@ -3,21 +3,22 @@
xmlns:core="http://icsharpcode.net/sharpdevelop/core"
xmlns:sd="clr-namespace:ICSharpCode.SharpDevelop"
xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui"
xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ICSharpCode.SharpDevelop.Gui.OptionPanels">
<StackPanel>
<GroupBox Header="{core:Localize Dialog.Options.IDEOptions.LoadSaveOptions.LoadLabel}">
<StackPanel>
<widgets:StackPanelWithSpacing SpaceBetweenItems="5">
<CheckBox Content="{core:Localize Dialog.Options.IDEOptions.LoadSaveOptions.LoadUserDataCheckBox}"
IsChecked="{core:OptionBinding gui:WpfWorkbench.LoadDocumentProperties}" />
<CheckBox Name="detectExternalChanges"
Content="{core:Localize Dialog.Options.IDEOptions.LoadSaveOptions.DetectExternalChanges}"
IsChecked="{core:OptionBinding sd:FileChangeWatcher.DetectExternalChangesOption}" />
<CheckBox Content="{core:Localize Dialog.Options.IDEOptions.LoadSaveOptions.AutoLoadExternalChanges}"
Margin="8,0,0,0"
Margin="18,0,0,0"
IsEnabled="{Binding IsChecked, ElementName=detectExternalChanges}"
IsChecked="{core:OptionBinding sd:FileChangeWatcher.AutoLoadExternalChangesOption}" />
</StackPanel>
</widgets:StackPanelWithSpacing>
</GroupBox>
<GroupBox Header="{core:Localize Dialog.Options.IDEOptions.LoadSaveOptions.SaveLabel}">
<StackPanel>
@ -28,7 +29,7 @@ @@ -28,7 +29,7 @@
Target="{Binding ElementName=encodingComboBox}" />
<ComboBox
Name="encodingComboBox"
Margin="8,0,4,4"
Margin="18,0,4,0"
ItemsSource="{x:Static sd:FileService.AllEncodings}"
SelectedItem="{core:OptionBinding sd:FileService.DefaultFileEncoding}">
<ComboBox.ItemTemplate>

11
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/IDEOptions/ProjectAndSolutionOptions.xaml

@ -13,11 +13,12 @@ @@ -13,11 +13,12 @@
<Label Content="{core:Localize Dialog.Options.IDEOptions.ProjectAndSolutionOptions.ProjectLocationLabel}"
Target="{Binding ElementName=defaultProjectLocationTextBox}" />
<DockPanel>
<Button Content="..." Click="defaultProjectLocationButtonClick" DockPanel.Dock="Right" />
<TextBox Name="defaultProjectLocationTextBox" />
<Button Content="..." Click="defaultProjectLocationButtonClick" DockPanel.Dock="Right" Padding="4,0" />
<TextBox Name="defaultProjectLocationTextBox" Margin="18,0,4,0" />
</DockPanel>
<CheckBox Content="{core:Localize Dialog.Options.IDEOptions.ProjectAndSolutionOptions.LoadPrevProjectCheckBox}"
IsChecked="{core:OptionBinding local:ProjectAndSolutionOptions.LoadPrevProjectAtStartup}" />
IsChecked="{core:OptionBinding local:ProjectAndSolutionOptions.LoadPrevProjectAtStartup}"
Margin="0,5,0,0"/>
</StackPanel>
</GroupBox>
<GroupBox Header="{core:Localize Dialog.Options.IDEOptions.ProjectAndSolutionOptions.BuildAndRunGroupBox}">
@ -34,13 +35,13 @@ @@ -34,13 +35,13 @@
<Label
Content="Build Verbosity:"
Target="{Binding ElementName=verbosityComboBox}" />
<ComboBox Name="verbosityComboBox" />
<ComboBox Name="verbosityComboBox" VerticalAlignment="Center" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label
Content="{core:Localize Dialog.Options.IDEOptions.ProjectAndSolutionOptions.WhenRunning}"
Target="{Binding ElementName=onExecuteComboBox}" />
<ComboBox Name="onExecuteComboBox" />
<ComboBox Name="onExecuteComboBox" VerticalAlignment="Center" />
</StackPanel>
</StackPanel>
</GroupBox>

38
src/Main/Base/Project/Src/Gui/Dialogs/TabbedOptionsDialog.xaml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"
x:Class="ICSharpCode.SharpDevelop.Gui.TabbedOptionsDialog"
Height="425"
Width="450"
@ -12,27 +12,19 @@ @@ -12,27 +12,19 @@
<RowDefinition
Height="Auto" />
</Grid.RowDefinitions>
<Button
Content="{core:Localize Global.OKButtonText}"
Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Right"
VerticalAlignment="Stretch"
Margin="0,6,117,8"
Width="100"
IsDefault="True"
Name="okButton"
Click="okButtonClick" />
<Button
Content="{core:Localize Global.CancelButtonText}"
Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Right"
VerticalAlignment="Stretch"
Margin="0,6,8,8"
Width="100"
IsCancel="True"
Name="cancelButton"
Click="cancelButtonClick" />
<widgets:UniformGridWithSpacing Columns="2" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right" Margin="0,4,12,12">
<Button
Content="{core:Localize Global.OKButtonText}"
IsDefault="True"
Name="okButton"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Click="okButtonClick" />
<Button
Content="{core:Localize Global.CancelButtonText}"
IsCancel="True"
Name="cancelButton"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Click="cancelButtonClick" />
</widgets:UniformGridWithSpacing>
</Grid>
</Window>

38
src/Main/Base/Project/Src/Gui/Dialogs/TreeViewOptionsDialog.xaml

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core"
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core" xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"
x:Class="ICSharpCode.SharpDevelop.Gui.TreeViewOptionsDialog"
Height="414"
Width="552"
@ -64,27 +64,19 @@ @@ -64,27 +64,19 @@
</DockPanel>
</ScrollViewer>
</Grid>
<Button
Content="{core:Localize Global.OKButtonText}"
Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Right"
VerticalAlignment="Stretch"
Margin="0,6,117,8"
Width="100"
IsDefault="True"
Name="okButton"
Click="okButtonClick" />
<Button
Content="{core:Localize Global.CancelButtonText}"
Grid.Column="0"
Grid.Row="1"
HorizontalAlignment="Right"
VerticalAlignment="Stretch"
Margin="0,6,8,8"
Width="100"
IsCancel="True"
Name="cancelButton"
Click="cancelButtonClick" />
<widgets:UniformGridWithSpacing Columns="2" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right" Margin="0,4,12,12">
<Button
Content="{core:Localize Global.OKButtonText}"
IsDefault="True"
Name="okButton"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Click="okButtonClick" />
<Button
Content="{core:Localize Global.CancelButtonText}"
IsCancel="True"
Name="cancelButton"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
Click="cancelButtonClick" />
</widgets:UniformGridWithSpacing>
</Grid>
</Window>

8
src/Main/Base/Project/Src/Project/Converter/UpgradeView.xaml

@ -93,7 +93,7 @@ @@ -93,7 +93,7 @@
Name="newVersionComboBox"
DisplayMemberPath="DisplayName"
SelectionChanged="newVersionComboBox_SelectionChanged"
Height="22"
VerticalAlignment="Center"
Grid.Row="0"
Grid.Column="1" />
<Label
@ -105,13 +105,13 @@ @@ -105,13 +105,13 @@
Name="newFrameworkComboBox"
Grid.Column="1"
Grid.Row="1"
Height="22"
VerticalAlignment="Center"
DisplayMemberPath="DisplayName"
SelectionChanged="newFrameworkComboBox_SelectionChanged" />
<Button
Name="convertButton"
Width="90"
Height="22"
Style="{x:Static core:GlobalStyles.ButtonStyle}"
HorizontalAlignment="Center"
Content="_Convert"
Grid.Column="0"
Grid.ColumnSpan="2"

24
src/Main/ICSharpCode.Core.Presentation/GlobalStyles.cs

@ -38,5 +38,29 @@ namespace ICSharpCode.Core.Presentation @@ -38,5 +38,29 @@ namespace ICSharpCode.Core.Presentation
public static ResourceKey DialogWindowStyleKey {
get { return dialogWindowStyleKey; }
}
public static Style ButtonStyle {
get {
return (Style)Application.Current.FindResource(ButtonStyleKey);
}
}
static readonly ResourceKey buttonStyleKey = new ComponentResourceKey(typeof(GlobalStyles), "ButtonStyle");
public static ResourceKey ButtonStyleKey {
get { return buttonStyleKey; }
}
public static Style WordWrapCheckBoxStyle {
get {
return (Style)Application.Current.FindResource(WordWrapCheckBoxStyleKey);
}
}
static readonly ResourceKey wordWrapCheckBoxStyleKey = new ComponentResourceKey(typeof(GlobalStyles), "WordWrapCheckBoxStyle");
public static ResourceKey WordWrapCheckBoxStyleKey {
get { return wordWrapCheckBoxStyleKey; }
}
}
}

1
src/Main/ICSharpCode.Core.Presentation/ICSharpCode.Core.Presentation.csproj

@ -88,7 +88,6 @@ @@ -88,7 +88,6 @@
<Compile Include="OptionBinding.cs" />
<Compile Include="PresentationResourceService.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RadioButtonGroup.cs" />
<Compile Include="SplitButton.cs" />
<Compile Include="StringParseExtension.cs" />
<Compile Include="ToolBar\ToolBarButton.cs" />

43
src/Main/ICSharpCode.Core.Presentation/themes/generic.xaml

@ -14,6 +14,22 @@ @@ -14,6 +14,22 @@
<Setter Property="ShowInTaskbar" Value="False" />
</Style>
<Style TargetType="{x:Type Button}" x:Key="{x:Static local:GlobalStyles.ButtonStyleKey}">
<Setter Property="MinWidth" Value="73" />
<!-- <Setter Property="Height" Value="21" /> height implicit using text height+padding-->
<Setter Property="Padding" Value="9,1,9,1" />
</Style>
<Style TargetType="ToggleButton" x:Key="{x:Static local:GlobalStyles.WordWrapCheckBoxStyleKey}">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<AccessText Text="{Binding}" TextWrapping="WrapWithOverflow" />
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type Image}" x:Key="{x:Static local:ToolBarService.ImageStyleKey}">
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type ButtonBase}, AncestorLevel=1}, Path=IsEnabled}" Value="False">
@ -168,31 +184,6 @@ @@ -168,31 +184,6 @@
</Setter>
</Style>
<!-- Template for RadioButtonGroup -->
<!-- Necessary because Selector does not have a template by default. -->
<Style TargetType="{x:Type local:RadioButtonGroup}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:RadioButtonGroup}">
<Border BorderThickness="{TemplateBinding Control.BorderThickness}"
BorderBrush="{TemplateBinding Control.BorderBrush}"
Background="{TemplateBinding Control.Background}"
Padding="{TemplateBinding Control.Padding}"
SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}">
<ItemsPresenter />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- SortableGridViewColumn.
Displays an up arrow or down arrow in the column header when the grid is sorted using that column.
-->
@ -208,7 +199,7 @@ @@ -208,7 +199,7 @@
Data = "M 5,10 L 15,10 L 10,5 L 5,10"/>
<Path x:Name="downArrow"
Visibility="{Binding Path=Column.SortDirection, ConverterParameter={x:Static local:ColumnSortDirection.Descending}, RelativeSource={RelativeSource AncestorType={x:Type GridViewColumnHeader}}, Converter={StaticResource ColumnSortDirectionToVisibilityConverter}}"
StrokeThickness = "1"
StrokeThickness = "1"
Fill = "Gray"
Data = "M 5,5 L 10,10 L 15,5 L 5,5"/>
</StackPanel>

3
src/Main/ICSharpCode.SharpDevelop.Widgets/Project/ICSharpCode.SharpDevelop.Widgets.csproj

@ -75,6 +75,7 @@ @@ -75,6 +75,7 @@
<Compile Include="NumericUpDown.cs">
<DependentUpon>NumericUpDown.xaml</DependentUpon>
</Compile>
<Compile Include="RadioButtonGroup.cs" />
<Compile Include="Resources\BitmapResources.cs" />
<Compile Include="SideBar\SideBar.cs">
<SubType>UserControl</SubType>
@ -85,6 +86,8 @@ @@ -85,6 +86,8 @@
<Compile Include="DesignTimeSupport\DropDownEditorListBox.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="StackPanelWithSpacing.cs" />
<Compile Include="UniformGridWithSpacing.cs" />
<Compile Include="ZoomButtons.cs">
<DependentUpon>ZoomScrollViewer.xaml</DependentUpon>
</Compile>

2
src/Main/ICSharpCode.Core.Presentation/RadioButtonGroup.cs → src/Main/ICSharpCode.SharpDevelop.Widgets/Project/RadioButtonGroup.cs

@ -11,7 +11,7 @@ using System.Windows; @@ -11,7 +11,7 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
namespace ICSharpCode.Core.Presentation
namespace ICSharpCode.SharpDevelop.Widgets
{
/// <summary>
/// Makes it easier to bind data bind a set of radio buttons to a single value.

101
src/Main/ICSharpCode.SharpDevelop.Widgets/Project/StackPanelWithSpacing.cs

@ -0,0 +1,101 @@ @@ -0,0 +1,101 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <author name="Daniel Grunwald"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Windows;
using System.Windows.Controls;
namespace ICSharpCode.SharpDevelop.Widgets
{
/// <summary>
/// StackPanel with spacing between elements.
/// Unlike actual StackPanel, this one does not support virtualized scrolling.
/// </summary>
public class StackPanelWithSpacing : Panel
{
public static readonly DependencyProperty OrientationProperty =
DependencyProperty.Register("Orientation", typeof(Orientation), typeof(StackPanelWithSpacing),
new FrameworkPropertyMetadata(Orientation.Vertical, FrameworkPropertyMetadataOptions.AffectsMeasure));
public Orientation Orientation {
get { return (Orientation)GetValue(OrientationProperty); }
set { SetValue(OrientationProperty, value); }
}
public static readonly DependencyProperty SpaceBetweenItemsProperty =
DependencyProperty.Register("SpaceBetweenItems", typeof(double), typeof(StackPanelWithSpacing),
new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsMeasure));
public double SpaceBetweenItems {
get { return (double)GetValue(SpaceBetweenItemsProperty); }
set { SetValue(SpaceBetweenItemsProperty, value); }
}
protected override bool HasLogicalOrientation {
get { return true; }
}
protected override Orientation LogicalOrientation {
get { return this.Orientation; }
}
protected override Size MeasureOverride(Size availableSize)
{
Orientation orientation = this.Orientation;
if (orientation == Orientation.Horizontal) {
availableSize.Width = double.PositiveInfinity;
} else {
availableSize.Height = double.PositiveInfinity;
}
double spaceBetweenItems = this.SpaceBetweenItems;
double pos = 0;
double maxWidth = 0;
bool hasVisibleItems = false;
foreach (UIElement element in this.InternalChildren) {
element.Measure(availableSize);
Size desiredSize = element.DesiredSize;
if (orientation == Orientation.Horizontal) {
maxWidth = Math.Max(maxWidth, desiredSize.Height);
pos += desiredSize.Width;
} else {
maxWidth = Math.Max(maxWidth, desiredSize.Width);
pos += desiredSize.Height;
}
if (element.Visibility != Visibility.Collapsed) {
pos += spaceBetweenItems;
hasVisibleItems = true;
}
}
if (hasVisibleItems)
pos -= spaceBetweenItems;
if (orientation == Orientation.Horizontal)
return new Size(pos, maxWidth);
else
return new Size(maxWidth, pos);
}
protected override Size ArrangeOverride(Size finalSize)
{
Orientation orientation = this.Orientation;
double spaceBetweenItems = this.SpaceBetweenItems;
double pos = 0;
foreach (UIElement element in this.InternalChildren) {
if (orientation == Orientation.Horizontal) {
element.Arrange(new Rect(pos, 0, element.DesiredSize.Width, finalSize.Height));
pos += element.DesiredSize.Width;
} else {
element.Arrange(new Rect(0, pos, finalSize.Width, element.DesiredSize.Height));
pos += element.DesiredSize.Height;
}
if (element.Visibility != Visibility.Collapsed) {
pos += spaceBetweenItems;
}
}
return finalSize;
}
}
}

70
src/Main/ICSharpCode.SharpDevelop.Widgets/Project/UniformGridWithSpacing.cs

@ -0,0 +1,70 @@ @@ -0,0 +1,70 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <author name="Daniel Grunwald"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Windows;
using System.Windows.Controls.Primitives;
namespace ICSharpCode.SharpDevelop.Widgets
{
/// <summary>
/// UniformGrid that has spacing between columns/rows.
/// </summary>
public class UniformGridWithSpacing : UniformGrid
{
public static readonly DependencyProperty SpaceBetweenColumnsProperty =
DependencyProperty.Register("SpaceBetweenColumns", typeof(double), typeof(UniformGridWithSpacing),
new FrameworkPropertyMetadata(7.0, FrameworkPropertyMetadataOptions.AffectsMeasure));
public double SpaceBetweenColumns {
get { return (double)GetValue(SpaceBetweenColumnsProperty); }
set { SetValue(SpaceBetweenColumnsProperty, value); }
}
public static readonly DependencyProperty SpaceBetweenRowsProperty =
DependencyProperty.Register("SpaceBetweenRows", typeof(double), typeof(UniformGridWithSpacing),
new FrameworkPropertyMetadata(5.0, FrameworkPropertyMetadataOptions.AffectsMeasure));
public double SpaceBetweenRows {
get { return (double)GetValue(SpaceBetweenRowsProperty); }
set { SetValue(SpaceBetweenRowsProperty, value); }
}
protected override Size MeasureOverride(Size constraint)
{
Size s = base.MeasureOverride(constraint);
return new Size(s.Width + Math.Max(0, this.Columns - 1) * this.SpaceBetweenColumns,
s.Height + Math.Max(0, this.Rows - 1) * this.SpaceBetweenRows);
}
protected override Size ArrangeOverride(Size arrangeSize)
{
double spaceBetweenColumns = this.SpaceBetweenColumns;
double spaceBetweenRows = this.SpaceBetweenRows;
int rows = Math.Max(1, this.Rows);
int columns = Math.Max(1, this.Columns);
Rect rect = new Rect(0, 0,
(arrangeSize.Width - spaceBetweenColumns * (columns - 1)) / columns,
(arrangeSize.Height - spaceBetweenRows * (rows - 1)) / rows);
int currentColumn = this.FirstColumn;
rect.X += currentColumn * (rect.Width + spaceBetweenColumns);
foreach (UIElement element in this.InternalChildren) {
element.Arrange(rect);
if (element.Visibility != Visibility.Collapsed) {
if (++currentColumn >= columns) {
currentColumn = 0;
rect.X = 0;
rect.Y += rect.Height + spaceBetweenRows;
} else {
rect.X += rect.Width + spaceBetweenColumns;
}
}
}
return arrangeSize;
}
}
}

25
src/Main/ICSharpCode.SharpDevelop.Widgets/Project/themes/generic.xaml

@ -40,4 +40,29 @@ @@ -40,4 +40,29 @@
</Setter.Value>
</Setter>
</Style>
<!-- Template for RadioButtonGroup -->
<!-- Necessary because Selector does not have a template by default. -->
<Style TargetType="{x:Type local:RadioButtonGroup}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:RadioButtonGroup}">
<Border BorderThickness="{TemplateBinding Control.BorderThickness}"
BorderBrush="{TemplateBinding Control.BorderBrush}"
Background="{TemplateBinding Control.Background}"
Padding="{TemplateBinding Control.Padding}"
SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}">
<ItemsPresenter />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<local:StackPanelWithSpacing SpaceBetweenItems="5"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
Loading…
Cancel
Save