|
21 | 21 | </UserControl.Resources> |
22 | 22 | <StackPanel> |
23 | 23 | <TextBlock Text="{x:Static localization:Strings.Theme}" Style="{StaticResource HeaderTextBlock}" /> |
24 | | - <ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{x:Static metro:ThemeManager.AppThemes}" VerticalAlignment="Top" BorderThickness="0" SelectionMode="Single" > |
| 24 | + <ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{x:Static metro:ThemeManager.AppThemes}" VerticalAlignment="Top" BorderThickness="0" SelectionMode="Single" Margin="0,0,0,20"> |
25 | 25 | <ListView.ItemTemplate> |
26 | 26 | <DataTemplate> |
27 | 27 | <Rectangle Width="48" Height="48" Margin="-1,2" Fill="{Binding Converter={StaticResource AppThemeToBrushConverter}, ConverterParameter='Name'}" ToolTip="{Binding Converter={StaticResource AppThemeToStringConverter}, ConverterParameter='Name'}"/> |
|
43 | 43 | <Binding Path="AppThemeSelectedItem" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" /> |
44 | 44 | </ListView.SelectedItem> |
45 | 45 | </ListView> |
46 | | - <TextBlock Text="{x:Static localization:Strings.Accent}" Style="{StaticResource HeaderTextBlock}"> |
47 | | - <StackPanel> |
48 | | - <ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{x:Static metro:ThemeManager.Accents}" BorderThickness="0" SelectionMode="Single" Margin="0,0,0,10"> |
49 | | - <ListView.ItemTemplate> |
50 | | - <DataTemplate > |
51 | | - <Rectangle Width="48" Height="48" Margin="-1,2" Fill="{Binding Converter={StaticResource AccentToBrushConverter}, ConverterParameter='Name'}" ToolTip="{Binding Converter={StaticResource AccentToStringConverter}, ConverterParameter='Name'}" /> |
52 | | - </DataTemplate> |
53 | | - </ListView.ItemTemplate> |
54 | | - <ListView.ItemsPanel> |
55 | | - <ItemsPanelTemplate> |
56 | | - <WrapPanel /> |
57 | | - </ItemsPanelTemplate> |
58 | | - </ListView.ItemsPanel> |
59 | | - <!-- BUGFIX This has to be set, to enable mouse wheel scrolling --> |
60 | | - <ListBox.Template> |
61 | | - <ControlTemplate> |
62 | | - <ItemsPresenter /> |
63 | | - </ControlTemplate> |
64 | | - </ListBox.Template> |
65 | | - <!-- /BUGFIX--> |
66 | | - <ListView.SelectedItem> |
67 | | - <Binding Path="AccentSelectedItem" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" /> |
68 | | - </ListView.SelectedItem> |
69 | | - </ListView> |
70 | | - <StackPanel Orientation="Horizontal"> |
71 | | - <StackPanel.InputBindings> |
72 | | - <MouseBinding Gesture="LeftClick" Command="{x:Static documentation:DocumentationManager.OpenDocumentationCommand}" CommandParameter="{x:Static documentation:DocumentationIdentifier.HowToCreateCustomThemeAndAccent}" /> |
73 | | - </StackPanel.InputBindings> |
74 | | - <StackPanel.Style> |
75 | | - <Style TargetType="{x:Type StackPanel}"> |
76 | | - <Setter Property="TextBlock.Foreground" Value="{DynamicResource AccentColorBrush}" /> |
77 | | - <Setter Property="Cursor" Value="Hand" /> |
| 46 | + <TextBlock Text="{x:Static localization:Strings.Accent}" Style="{StaticResource HeaderTextBlock}" /> |
| 47 | + <StackPanel Margin="0,0,0,20"> |
| 48 | + <ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{x:Static metro:ThemeManager.Accents}" BorderThickness="0" SelectionMode="Single" Margin="0,0,0,10"> |
| 49 | + <ListView.ItemTemplate> |
| 50 | + <DataTemplate > |
| 51 | + <Rectangle Width="48" Height="48" Margin="-1,2" Fill="{Binding Converter={StaticResource AccentToBrushConverter}, ConverterParameter='Name'}" ToolTip="{Binding Converter={StaticResource AccentToStringConverter}, ConverterParameter='Name'}" /> |
| 52 | + </DataTemplate> |
| 53 | + </ListView.ItemTemplate> |
| 54 | + <ListView.ItemsPanel> |
| 55 | + <ItemsPanelTemplate> |
| 56 | + <WrapPanel /> |
| 57 | + </ItemsPanelTemplate> |
| 58 | + </ListView.ItemsPanel> |
| 59 | + <!-- BUGFIX This has to be set, to enable mouse wheel scrolling --> |
| 60 | + <ListBox.Template> |
| 61 | + <ControlTemplate> |
| 62 | + <ItemsPresenter /> |
| 63 | + </ControlTemplate> |
| 64 | + </ListBox.Template> |
| 65 | + <!-- /BUGFIX--> |
| 66 | + <ListView.SelectedItem> |
| 67 | + <Binding Path="AccentSelectedItem" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" /> |
| 68 | + </ListView.SelectedItem> |
| 69 | + </ListView> |
| 70 | + <StackPanel Orientation="Horizontal"> |
| 71 | + <StackPanel.InputBindings> |
| 72 | + <MouseBinding Gesture="LeftClick" Command="{x:Static documentation:DocumentationManager.OpenDocumentationCommand}" CommandParameter="{x:Static documentation:DocumentationIdentifier.HowToCreateCustomThemeAndAccent}" /> |
| 73 | + </StackPanel.InputBindings> |
| 74 | + <StackPanel.Style> |
| 75 | + <Style TargetType="{x:Type StackPanel}"> |
| 76 | + <Setter Property="TextBlock.Foreground" Value="{DynamicResource AccentColorBrush}" /> |
| 77 | + <Setter Property="Cursor" Value="Hand" /> |
| 78 | + <Style.Triggers> |
| 79 | + <Trigger Property="IsMouseOver" Value="True"> |
| 80 | + <Setter Property="TextBlock.Foreground" Value="{DynamicResource BlackColorBrush}" /> |
| 81 | + </Trigger> |
| 82 | + </Style.Triggers> |
| 83 | + </Style> |
| 84 | + </StackPanel.Style> |
| 85 | + <Rectangle Width="16" Height="20"> |
| 86 | + <Rectangle.OpacityMask> |
| 87 | + <VisualBrush Stretch="Uniform" Visual="{iconPacks:Material Kind=OpenInNew}"/> |
| 88 | + </Rectangle.OpacityMask> |
| 89 | + <Rectangle.Style> |
| 90 | + <Style TargetType="{x:Type Rectangle}"> |
| 91 | + <Setter Property="Fill" Value="{DynamicResource AccentColorBrush}" /> |
78 | 92 | <Style.Triggers> |
79 | | - <Trigger Property="IsMouseOver" Value="True"> |
80 | | - <Setter Property="TextBlock.Foreground" Value="{DynamicResource BlackColorBrush}" /> |
81 | | - </Trigger> |
| 93 | + <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type StackPanel}}, Path=IsMouseOver}" Value="True"> |
| 94 | + <Setter Property="Fill" Value="{DynamicResource BlackColorBrush}" /> |
| 95 | + </DataTrigger> |
82 | 96 | </Style.Triggers> |
83 | 97 | </Style> |
84 | | - </StackPanel.Style> |
85 | | - <Rectangle Width="16" Height="20"> |
86 | | - <Rectangle.OpacityMask> |
87 | | - <VisualBrush Stretch="Uniform" Visual="{iconPacks:Material Kind=OpenInNew}"/> |
88 | | - </Rectangle.OpacityMask> |
89 | | - <Rectangle.Style> |
90 | | - <Style TargetType="{x:Type Rectangle}"> |
91 | | - <Setter Property="Fill" Value="{DynamicResource AccentColorBrush}" /> |
92 | | - <Style.Triggers> |
93 | | - <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type StackPanel}}, Path=IsMouseOver}" Value="True"> |
94 | | - <Setter Property="Fill" Value="{DynamicResource BlackColorBrush}" /> |
95 | | - </DataTrigger> |
96 | | - </Style.Triggers> |
97 | | - </Style> |
98 | | - </Rectangle.Style> |
99 | | - </Rectangle> |
100 | | - <TextBlock Text="{x:Static localization:Strings.DocumentationTitle_00002}" FontSize="14" Margin="10,0,0,0" /> |
101 | | - </StackPanel> |
| 98 | + </Rectangle.Style> |
| 99 | + </Rectangle> |
| 100 | + <TextBlock Text="{x:Static localization:Strings.DocumentationTitle_00002}" FontSize="14" Margin="10,0,0,0" /> |
102 | 101 | </StackPanel> |
103 | | - </TextBlock> |
| 102 | + </StackPanel> |
104 | 103 | <Grid> |
105 | 104 | <Grid.ColumnDefinitions> |
106 | 105 | <ColumnDefinition Width="*" /> |
|
0 commit comments