Browse Source

Fix #2107: Add ScrollViewer around DisplaySettingsPanel

pull/2113/head
Siegfried Pammer 6 years ago
parent
commit
a3b4993655
  1. 168
      ILSpy/Options/DisplaySettingsPanel.xaml

168
ILSpy/Options/DisplaySettingsPanel.xaml

@ -1,91 +1,93 @@
<UserControl x:Class="ICSharpCode.ILSpy.Options.DisplaySettingsPanel" <UserControl x:Class="ICSharpCode.ILSpy.Options.DisplaySettingsPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties" xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties"
xmlns:local="clr-namespace:ICSharpCode.ILSpy.Options"> xmlns:local="clr-namespace:ICSharpCode.ILSpy.Options">
<UserControl.Resources> <UserControl.Resources>
<local:FontSizeConverter x:Key="fontSizeConv" /> <local:FontSizeConverter x:Key="fontSizeConv" />
</UserControl.Resources> </UserControl.Resources>
<Grid> <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<Grid.RowDefinitions> <Grid>
<RowDefinition Height="Auto"/> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> <RowDefinition/>
<GroupBox Header="{x:Static properties:Resources.Font}"> </Grid.RowDefinitions>
<Grid> <GroupBox Header="{x:Static properties:Resources.Font}">
<Grid.ColumnDefinitions> <Grid>
<ColumnDefinition Width="Auto" /> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" />
<Grid.RowDefinitions> </Grid.ColumnDefinitions>
<RowDefinition Height="Auto" /> <Grid.RowDefinitions>
<RowDefinition Height="50" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> <RowDefinition Height="50" />
<Label Margin="3,0" Content="{x:Static properties:Resources.DisplaySettingsPanel_Font}"></Label> </Grid.RowDefinitions>
<ComboBox x:Name="fontSelector" VerticalContentAlignment="Center" SelectedItem="{Binding SelectedFont}" Grid.Column="1"> <Label Margin="3,0" Content="{x:Static properties:Resources.DisplaySettingsPanel_Font}"></Label>
<ComboBox.ItemTemplate> <ComboBox x:Name="fontSelector" VerticalContentAlignment="Center" SelectedItem="{Binding SelectedFont}" Grid.Column="1">
<DataTemplate> <ComboBox.ItemTemplate>
<TextBlock Text="{Binding Source}" /> <DataTemplate>
</DataTemplate> <TextBlock Text="{Binding Source}" />
</ComboBox.ItemTemplate> </DataTemplate>
</ComboBox> </ComboBox.ItemTemplate>
<Label Grid.Column="2" Margin="3,0" Content="{x:Static properties:Resources.Size}"></Label> </ComboBox>
<ComboBox Grid.Column="3" Text="{Binding SelectedFontSize, Converter={StaticResource fontSizeConv}}" IsEditable="True" Margin="3,0"> <Label Grid.Column="2" Margin="3,0" Content="{x:Static properties:Resources.Size}"></Label>
<ComboBoxItem>6</ComboBoxItem> <ComboBox Grid.Column="3" Text="{Binding SelectedFontSize, Converter={StaticResource fontSizeConv}}" IsEditable="True" Margin="3,0">
<ComboBoxItem>7</ComboBoxItem> <ComboBoxItem>6</ComboBoxItem>
<ComboBoxItem>8</ComboBoxItem> <ComboBoxItem>7</ComboBoxItem>
<ComboBoxItem>9</ComboBoxItem> <ComboBoxItem>8</ComboBoxItem>
<ComboBoxItem>10</ComboBoxItem> <ComboBoxItem>9</ComboBoxItem>
<ComboBoxItem>11</ComboBoxItem> <ComboBoxItem>10</ComboBoxItem>
<ComboBoxItem>12</ComboBoxItem> <ComboBoxItem>11</ComboBoxItem>
<ComboBoxItem>13</ComboBoxItem> <ComboBoxItem>12</ComboBoxItem>
<ComboBoxItem>14</ComboBoxItem> <ComboBoxItem>13</ComboBoxItem>
<ComboBoxItem>15</ComboBoxItem> <ComboBoxItem>14</ComboBoxItem>
<ComboBoxItem>16</ComboBoxItem> <ComboBoxItem>15</ComboBoxItem>
<ComboBoxItem>17</ComboBoxItem> <ComboBoxItem>16</ComboBoxItem>
<ComboBoxItem>18</ComboBoxItem> <ComboBoxItem>17</ComboBoxItem>
<ComboBoxItem>19</ComboBoxItem> <ComboBoxItem>18</ComboBoxItem>
<ComboBoxItem>20</ComboBoxItem> <ComboBoxItem>19</ComboBoxItem>
<ComboBoxItem>21</ComboBoxItem> <ComboBoxItem>20</ComboBoxItem>
<ComboBoxItem>22</ComboBoxItem> <ComboBoxItem>21</ComboBoxItem>
<ComboBoxItem>23</ComboBoxItem> <ComboBoxItem>22</ComboBoxItem>
<ComboBoxItem>24</ComboBoxItem> <ComboBoxItem>23</ComboBoxItem>
</ComboBox> <ComboBoxItem>24</ComboBoxItem>
<Border Grid.Row="1" Grid.ColumnSpan="4" BorderBrush="Black" BorderThickness="1" Background="White" Margin="3,5"> </ComboBox>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="AaBbCcXxYyZz" FontFamily="{Binding SelectedFont}" FontSize="{Binding SelectedFontSize}" /> <Border Grid.Row="1" Grid.ColumnSpan="4" BorderBrush="Black" BorderThickness="1" Background="White" Margin="3,5">
</Border> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="AaBbCcXxYyZz" FontFamily="{Binding SelectedFont}" FontSize="{Binding SelectedFontSize}" />
</Grid> </Border>
</GroupBox> </Grid>
<GroupBox Header="{x:Static properties:Resources.Indentation}" Grid.Row="1"> </GroupBox>
<StackPanel Margin="3"> <GroupBox Header="{x:Static properties:Resources.Indentation}" Grid.Row="1">
<CheckBox IsChecked="{Binding IndentationUseTabs}" Content="{x:Static properties:Resources.UseTabsInsteadOfSpaces}"></CheckBox> <StackPanel Margin="3">
<StackPanel Orientation="Horizontal"> <CheckBox IsChecked="{Binding IndentationUseTabs}" Content="{x:Static properties:Resources.UseTabsInsteadOfSpaces}"></CheckBox>
<Label Content="{x:Static properties:Resources.TabSize}"></Label> <StackPanel Orientation="Horizontal">
<TextBox x:Name="tabSizeTextBox" Width="50" Margin="3" Text="{Binding IndentationTabSize}" PreviewTextInput="TextBox_PreviewTextInput" /> <Label Content="{x:Static properties:Resources.TabSize}"></Label>
<TextBox x:Name="tabSizeTextBox" Width="50" Margin="3" Text="{Binding IndentationTabSize}" PreviewTextInput="TextBox_PreviewTextInput" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label Content="{x:Static properties:Resources.IndentSize}"></Label>
<TextBox x:Name="indentSizeTextBox" Width="50" Margin="3" Text="{Binding IndentationSize}" PreviewTextInput="TextBox_PreviewTextInput" />
</StackPanel>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal"> </GroupBox>
<Label Content="{x:Static properties:Resources.IndentSize}"></Label> <GroupBox Header="{x:Static properties:Resources.OtherOptions}" Grid.Row="2">
<TextBox x:Name="indentSizeTextBox" Width="50" Margin="3" Text="{Binding IndentationSize}" PreviewTextInput="TextBox_PreviewTextInput" /> <StackPanel Margin="3">
<CheckBox IsChecked="{Binding ShowLineNumbers}" Content="{x:Static properties:Resources.ShowLineNumbers}"></CheckBox>
<CheckBox IsChecked="{Binding ShowMetadataTokens}" Content="{x:Static properties:Resources.ShowMetadataTokens}"></CheckBox>
<CheckBox IsChecked="{Binding ShowMetadataTokensInBase10}" Content="{x:Static properties:Resources.ShowMetadataTokensInBase10}"></CheckBox>
<CheckBox IsChecked="{Binding HideEmptyMetadataTables}" Content="{x:Static properties:Resources.HideEmptyMetadataTables}"></CheckBox>
<CheckBox IsChecked="{Binding ShowDebugInfo}" Content="{x:Static properties:Resources.ShowInfoFromDebugSymbolsAvailable}"></CheckBox>
<CheckBox IsChecked="{Binding EnableWordWrap}" Content="{x:Static properties:Resources.EnableWordWrap}"></CheckBox>
<CheckBox IsChecked="{Binding FoldBraces}" Content="{x:Static properties:Resources.EnableFoldingBlocksBraces}"></CheckBox>
<CheckBox IsChecked="{Binding HighlightMatchingBraces}" Content="{x:Static properties:Resources.HighlightMatchingBraces}"></CheckBox>
<CheckBox IsChecked="{Binding SortResults}" Content="{x:Static properties:Resources.SortResultsFitness}"></CheckBox>
<CheckBox IsChecked="{Binding ExpandMemberDefinitions}" Content="{x:Static properties:Resources.ExpandMemberDefinitionsAfterDecompilation}"></CheckBox>
<CheckBox IsChecked="{Binding ExpandUsingDeclarations}" Content="{x:Static properties:Resources.ExpandUsingDeclarationsAfterDecompilation}"></CheckBox>
</StackPanel> </StackPanel>
</StackPanel> </GroupBox>
</GroupBox> </Grid>
<GroupBox Header="{x:Static properties:Resources.OtherOptions}" Grid.Row="2"> </ScrollViewer>
<StackPanel Margin="3">
<CheckBox IsChecked="{Binding ShowLineNumbers}" Content="{x:Static properties:Resources.ShowLineNumbers}"></CheckBox>
<CheckBox IsChecked="{Binding ShowMetadataTokens}" Content="{x:Static properties:Resources.ShowMetadataTokens}"></CheckBox>
<CheckBox IsChecked="{Binding ShowMetadataTokensInBase10}" Content="{x:Static properties:Resources.ShowMetadataTokensInBase10}"></CheckBox>
<CheckBox IsChecked="{Binding HideEmptyMetadataTables}" Content="{x:Static properties:Resources.HideEmptyMetadataTables}"></CheckBox>
<CheckBox IsChecked="{Binding ShowDebugInfo}" Content="{x:Static properties:Resources.ShowInfoFromDebugSymbolsAvailable}"></CheckBox>
<CheckBox IsChecked="{Binding EnableWordWrap}" Content="{x:Static properties:Resources.EnableWordWrap}"></CheckBox>
<CheckBox IsChecked="{Binding FoldBraces}" Content="{x:Static properties:Resources.EnableFoldingBlocksBraces}"></CheckBox>
<CheckBox IsChecked="{Binding HighlightMatchingBraces}" Content="{x:Static properties:Resources.HighlightMatchingBraces}"></CheckBox>
<CheckBox IsChecked="{Binding SortResults}" Content="{x:Static properties:Resources.SortResultsFitness}"></CheckBox>
<CheckBox IsChecked="{Binding ExpandMemberDefinitions}" Content="{x:Static properties:Resources.ExpandMemberDefinitionsAfterDecompilation}"></CheckBox>
<CheckBox IsChecked="{Binding ExpandUsingDeclarations}" Content="{x:Static properties:Resources.ExpandUsingDeclarationsAfterDecompilation}"></CheckBox>
</StackPanel>
</GroupBox>
</Grid>
</UserControl> </UserControl>
Loading…
Cancel
Save