make system name and faction name bold

This commit is contained in:
Florian Stinglmayr 2022-11-26 17:39:31 +01:00
parent f3134d36d4
commit db67ef21fa
2 changed files with 12 additions and 1 deletions

View File

@ -60,7 +60,10 @@
<HierarchicalDataTemplate DataType="{x:Type local:Objective}" ItemsSource="{Binding UITransactions}" ItemContainerStyle="{StaticResource StretchingTreeViewStyle}"> <HierarchicalDataTemplate DataType="{x:Type local:Objective}" ItemsSource="{Binding UITransactions}" ItemContainerStyle="{StaticResource StretchingTreeViewStyle}">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<CheckBox Focusable="False" IsChecked="{Binding IsEnabled}" VerticalAlignment="Center"/> <CheckBox Focusable="False" IsChecked="{Binding IsEnabled}" VerticalAlignment="Center"/>
<TextBlock Text="{Binding Name}" Margin="5,0" /> <TextBlock Text="System: " Visibility="{Binding HasSystem}" Margin="5,0,0,0"/>
<TextBlock Text="{Binding System}" FontWeight="DemiBold" Visibility="{Binding HasSystem}"/>
<TextBlock Text="Faction: " Visibility="{Binding HasFaction}" Margin="5,0,0,0"/>
<TextBlock Text="{Binding Faction}" FontWeight="DemiBold" Visibility="{Binding HasFaction}"/>
</StackPanel> </StackPanel>
<HierarchicalDataTemplate.ItemTemplate> <HierarchicalDataTemplate.ItemTemplate>
<HierarchicalDataTemplate> <HierarchicalDataTemplate>

View File

@ -79,6 +79,14 @@ public class Objective : IComparable<Objective> {
get { return UITransactions.Select(x => x.Transaction).ToList<Transaction>(); } get { return UITransactions.Select(x => x.Transaction).ToList<Transaction>(); }
} }
public Visibility HasSystem {
get { return string.IsNullOrEmpty(System) ? Visibility.Hidden : Visibility.Visible; }
}
public Visibility HasFaction {
get { return string.IsNullOrEmpty(Faction) ? Visibility.Hidden : Visibility.Visible; }
}
public string Name { public string Name {
get { return this.ToString(); } get { return this.ToString(); }
} }