Update WineVarietyTemplate

This commit is contained in:
2023-05-25 23:21:34 +02:00
parent df7f2174e5
commit 4c402d81ab
2 changed files with 3 additions and 2 deletions

View File

@ -40,7 +40,8 @@
<ControlTemplate x:Key="WineVarietyTemplateExtended">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding SortId}" MinWidth="36" Margin="0,0,10,0"/>
<TextBlock Text="{Binding NameWithComment}"/>
<TextBlock Text="{Binding Name}"/>
<TextBlock Text="{Binding CommentFormat}" FontSize="10" VerticalAlignment="Bottom" Margin="0,0,0,2"/>
</StackPanel>
</ControlTemplate>
<DataTemplate x:Key="WineVarietyTemplate">

View File

@ -16,7 +16,7 @@ namespace Elwig.Models {
[Column("comment")]
public string? Comment { get; private set; }
public string NameWithComment => Name + ((Comment != null) ? $" ({Comment})" : "");
public string CommentFormat => (Comment != null) ? $" ({Comment})" : "";
public override string ToString() {
return Name;