Fixed Usages: 0 being visible when editing a non-master theme
This commit is contained in:
parent
61c2902f0c
commit
9cb854b584
|
@ -21,30 +21,29 @@
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.Resources>
|
<Grid.Resources>
|
||||||
<DataTemplate x:Key="EditableComponentNameTemplate">
|
<DataTemplate x:Key="EditableComponentNameTemplate">
|
||||||
<TextBox Text="{Binding ComponentName}" />
|
<StackPanel>
|
||||||
|
<TextBlock Text="{Binding UsageCount, StringFormat='Usages: {0}'}"
|
||||||
|
FontSize="10"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Visibility="{Binding Path=DataContext.EditEnabled, RelativeSource={RelativeSource AncestorType={x:Type views:ThemeEditorView}}, Converter={StaticResource BooleanVisibilityConverter}}">
|
||||||
|
<TextBlock.Style>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding UsageCount}" Value="0">
|
||||||
|
<Setter Property="Foreground" Value="Red" />
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
<Setter Property="Foreground" Value="SteelBlue" />
|
||||||
|
</Style>
|
||||||
|
</TextBlock.Style>
|
||||||
|
</TextBlock>
|
||||||
|
<TextBox Text="{Binding ComponentName}" />
|
||||||
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate x:Key="ViewOnlyComponentNameTemplate">
|
<DataTemplate x:Key="ViewOnlyComponentNameTemplate">
|
||||||
<TextBlock Text="{Binding ComponentName}" ToolTip="{Binding ComponentName}" />
|
<TextBlock Text="{Binding ComponentName}" ToolTip="{Binding ComponentName}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</Grid.Resources>
|
</Grid.Resources>
|
||||||
<DockPanel LastChildFill="True">
|
|
||||||
<TextBlock DockPanel.Dock="Left"
|
|
||||||
Text="{Binding UsageCount, StringFormat='Usages: {0}'}"
|
|
||||||
FontSize="10"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
Visibility="{Binding Path=DataContext.EditEnabled, RelativeSource={RelativeSource AncestorType={x:Type views:ThemeEditorView}}, Converter={StaticResource BooleanVisibilityConverter}}">
|
|
||||||
<TextBlock.Style>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Style.Triggers>
|
|
||||||
<DataTrigger Binding="{Binding UsageCount}" Value="0">
|
|
||||||
<Setter Property="Foreground" Value="Red" />
|
|
||||||
</DataTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
<Setter Property="Foreground" Value="SteelBlue" />
|
|
||||||
</Style>
|
|
||||||
</TextBlock.Style>
|
|
||||||
</TextBlock>
|
|
||||||
</DockPanel>
|
|
||||||
<ContentControl Grid.Row="1" Content="{Binding}">
|
<ContentControl Grid.Row="1" Content="{Binding}">
|
||||||
<ContentControl.Style>
|
<ContentControl.Style>
|
||||||
<Style TargetType="ContentControl">
|
<Style TargetType="ContentControl">
|
||||||
|
@ -59,7 +58,6 @@
|
||||||
</Style>
|
</Style>
|
||||||
</ContentControl.Style>
|
</ContentControl.Style>
|
||||||
</ContentControl>
|
</ContentControl>
|
||||||
|
|
||||||
<xctk:ColorPicker Grid.Row="2" SelectedColor="{Binding Color}" />
|
<xctk:ColorPicker Grid.Row="2" SelectedColor="{Binding Color}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|
Loading…
Reference in New Issue