-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fixes #3251: Decompiler Settings: Checkbox in group header does not reflect state of the group
- Loading branch information
Showing
4 changed files
with
106 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,38 @@ | ||
<UserControl x:Class="ICSharpCode.ILSpy.Options.DecompilerSettingsPanel" | ||
x:ClassModifier="internal" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties" | ||
xmlns:toms="urn:TomsToolbox"> | ||
<UserControl.Resources> | ||
<CollectionViewSource x:Key="SettingsCollection" Source="{Binding Settings}"> | ||
<CollectionViewSource.GroupDescriptions> | ||
<PropertyGroupDescription PropertyName="Category" /> | ||
</CollectionViewSource.GroupDescriptions> | ||
</CollectionViewSource> | ||
</UserControl.Resources> | ||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition Height="*" /> | ||
</Grid.RowDefinitions> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="*" /> | ||
</Grid.ColumnDefinitions> | ||
<TextBlock Margin="3" Grid.ColumnSpan="3" TextWrapping="Wrap" Text="{x:Static properties:Resources.DecompilerSettingsPanelLongText}" /> | ||
<ListBox Grid.Row="1" ItemsSource="{Binding Source={StaticResource SettingsCollection}}"> | ||
<ListBox.ItemContainerStyle> | ||
<Style TargetType="ListBoxItem"> | ||
<Setter Property="IsTabStop" Value="False"/> | ||
<Setter Property="Focusable" Value="False"/> | ||
</Style> | ||
</ListBox.ItemContainerStyle> | ||
<ListBox.GroupStyle> | ||
<GroupStyle> | ||
<GroupStyle.Panel> | ||
<ItemsPanelTemplate> | ||
<VirtualizingStackPanel Orientation="Vertical" /> | ||
</ItemsPanelTemplate> | ||
</GroupStyle.Panel> | ||
<GroupStyle.ContainerStyle> | ||
<Style TargetType="{x:Type GroupItem}" BasedOn="{StaticResource {x:Type GroupItem}}"> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate> | ||
<Expander Padding="0" BorderThickness="0" IsExpanded="True"> | ||
<Expander.Header> | ||
<CheckBox Checked="OnGroupChecked" Unchecked="OnGroupUnchecked" Loaded="OnGroupLoaded" VerticalContentAlignment="Center" | ||
FontSize="16" FontWeight="Bold" Content="{Binding Name}" /> | ||
</Expander.Header> | ||
<ItemsPresenter/> | ||
</Expander> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
</GroupStyle.ContainerStyle> | ||
</GroupStyle> | ||
</ListBox.GroupStyle> | ||
<ListBox.ItemTemplate> | ||
<DataTemplate> | ||
<CheckBox Margin="19,0,0,0" IsChecked="{Binding IsEnabled}" Content="{Binding Description}" /> | ||
</DataTemplate> | ||
</ListBox.ItemTemplate> | ||
</ListBox> | ||
</Grid> | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:properties="clr-namespace:ICSharpCode.ILSpy.Properties" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:options="clr-namespace:ICSharpCode.ILSpy.Options" | ||
d:DataContext="{d:DesignInstance options:DecompilerSettingsViewModel}"> | ||
<DockPanel> | ||
<TextBlock Margin="3" DockPanel.Dock="Top" TextWrapping="Wrap" Text="{x:Static properties:Resources.DecompilerSettingsPanelLongText}" /> | ||
<ScrollViewer> | ||
<ItemsControl ItemsSource="{Binding Settings}"> | ||
<ItemsControl.ItemTemplate> | ||
<DataTemplate> | ||
<Grid> | ||
<Expander Padding="0" BorderThickness="0" IsExpanded="True"> | ||
<Expander.Header> | ||
<CheckBox VerticalContentAlignment="Center" | ||
FontSize="16" FontWeight="Bold" | ||
Content="{Binding Category}" | ||
IsChecked="{Binding AreAllItemsChecked, Mode=TwoWay}"/> | ||
</Expander.Header> | ||
<ItemsControl ItemsSource="{Binding Settings}"> | ||
<ItemsControl.ItemTemplate> | ||
<DataTemplate> | ||
<CheckBox Margin="28,0,0,0" IsChecked="{Binding IsEnabled}" Content="{Binding Description}" /> | ||
</DataTemplate> | ||
</ItemsControl.ItemTemplate> | ||
</ItemsControl> | ||
</Expander> | ||
</Grid> | ||
</DataTemplate> | ||
</ItemsControl.ItemTemplate> | ||
</ItemsControl> | ||
</ScrollViewer> | ||
</DockPanel> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters