Add custom announcement to tab items (#8027)

This commit is contained in:
vldmr11080 2020-11-13 17:51:21 +01:00 committed by GitHub
parent 4910bd3feb
commit 165a06b5a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 2 deletions

View File

@ -193,7 +193,7 @@
<TextBlock Name="DialogTitle" Text="{x:Static props:Resources.Choose_Layout}" Style="{StaticResource titleText}" />
<TabControl BorderThickness="0" x:Name="TemplateTab" AutomationProperties.LabeledBy="{Binding ElementName=DialogTitle}" SelectedIndex="{Binding IsCustomLayoutActive, Mode=OneWay, Converter={StaticResource BooleanToIntConverter}}">
<TabItem Header="{x:Static props:Resources.Templates}" Template="{StaticResource myTabs}">
<TabItem Header="{x:Static props:Resources.Templates}" Template="{StaticResource myTabs}" AutomationProperties.Name="{x:Static props:Resources.Tab_Item_Templates}">
<StackPanel>
<StackPanel Margin="0,15,0,8" Orientation="Horizontal" HorizontalAlignment="Center">
<Button x:Name="decrementZones" Width="40" Height="40" AutomationProperties.Name="{x:Static props:Resources.Zone_Count_Decrement}" Content="-" Style="{StaticResource spinnerButton}" Click="DecrementZones_Click"/>
@ -234,7 +234,7 @@
</TabItem>
<TabItem Header="{x:Static props:Resources.Custom}" Template="{StaticResource myTabs}">
<TabItem Header="{x:Static props:Resources.Custom}" Template="{StaticResource myTabs}" AutomationProperties.Name="{x:Static props:Resources.Tab_Item_Custom}">
<StackPanel>
<ItemsControl ItemsSource="{Binding CustomModels}" Margin="8,8,0,0">
<ItemsControl.ItemsPanel>

View File

@ -294,6 +294,24 @@ namespace FancyZonesEditor.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Custom tab selected, press ctrl + tab to switch to Templates.
/// </summary>
public static string Tab_Item_Custom {
get {
return ResourceManager.GetString("Tab_Item_Custom", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Templates tab selected, press ctrl + tab to switch to Custom.
/// </summary>
public static string Tab_Item_Templates {
get {
return ResourceManager.GetString("Tab_Item_Templates", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Columns.
/// </summary>

View File

@ -220,4 +220,10 @@
<data name="Template_Layout_Rows" xml:space="preserve">
<value>Rows</value>
</data>
<data name="Tab_Item_Custom" xml:space="preserve">
<value>Custom tab selected, press ctrl + tab to switch to Templates</value>
</data>
<data name="Tab_Item_Templates" xml:space="preserve">
<value>Templates tab selected, press ctrl + tab to switch to Custom</value>
</data>
</root>