| 1 | <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 3 | xmlns:local="clr-namespace:UI.Controls.SettingPanel" |
| 4 | xmlns:base="clr-namespace:UI.Controls.Base"> |
| 5 | <Style TargetType="{x:Type local:SettingPanelItem}"> |
| 6 | <Setter Property="SnapsToDevicePixels" |
| 7 | Value="true" /> |
| 8 | |
| 9 | <Setter Property="Background" Value="Transparent"/> |
| 10 | <Setter Property="Template"> |
| 11 | <Setter.Value> |
| 12 | <ControlTemplate TargetType="{x:Type local:SettingPanelItem}"> |
| 13 | <Border Background="{TemplateBinding Background}" Margin="15,16" x:Name="Border"> |
| 14 | |
| 15 | <Grid> |
| 16 | <Grid.ColumnDefinitions> |
| 17 | <ColumnDefinition Width="8*"/> |
| 18 | <ColumnDefinition Width="2*"/> |
| 19 | |
| 20 | </Grid.ColumnDefinitions> |
| 21 | |
| 22 | <Grid> |
| 23 | <StackPanel VerticalAlignment="Center" HorizontalAlignment="Left"> |
| 24 | <StackPanel Orientation="Horizontal" > |
| 25 | <TextBlock Text="{TemplateBinding Name}" FontSize="14" Foreground="{DynamicResource StandardTextBrush}" VerticalAlignment="Center"/> |
| 26 | <base:View Value="{TemplateBinding IsBeta}" VerticalAlignment="Center"> |
| 27 | <Border ToolTip="该功能或选项处于测试阶段,可能会出现预料之外的问题" Cursor="Help" Background="{DynamicResource WarningBrush}" CornerRadius="8" Padding="10,3" Margin="5,0,0,0"> |
| 28 | <TextBlock Text="Beta" FontSize="10" Foreground="White" VerticalAlignment="Center"/> |
| 29 | </Border> |
| 30 | </base:View> |
| 31 | |
| 32 | </StackPanel> |
| 33 | <base:View Value="{TemplateBinding Description}" Condition="not empty"> |
| 34 | <TextBlock Text="{TemplateBinding Description}" FontSize="12" Margin="0,4,0,0" Foreground="{DynamicResource SubTextBrush}" VerticalAlignment="Center" TextWrapping="WrapWithOverflow"/> |
| 35 | </base:View> |
| 36 | </StackPanel> |
| 37 | </Grid> |
| 38 | <Grid Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Right"> |
| 39 | <Border HorizontalAlignment="Left"> |
| 40 | <ContentPresenter HorizontalAlignment="Center" |
| 41 | VerticalAlignment="Center" |
| 42 | RecognizesAccessKey="True" |
| 43 | SnapsToDevicePixels="False" Content="{TemplateBinding Content}" |
| 44 | /> |
| 45 | </Border> |
| 46 | </Grid> |
| 47 | </Grid> |
| 48 | |
| 49 | </Border> |
| 50 | <ControlTemplate.Triggers> |
| 51 | |
| 52 | </ControlTemplate.Triggers> |
| 53 | </ControlTemplate> |
| 54 | </Setter.Value> |
| 55 | </Setter> |
| 56 | </Style> |
| 57 | </ResourceDictionary> |