App: Replace DataTemplate/ControlTemplate with TemplateSelector

This commit is contained in:
2024-04-30 13:02:45 +02:00
parent c4d68d11bc
commit 8bf8362480
6 changed files with 77 additions and 40 deletions

View File

@ -355,8 +355,12 @@
<Label Content="Sorte:" Margin="10,40,0,10"/>
<ComboBox x:Name="AreaCommitmentTypeWineVariantInput" Grid.Column="1" Grid.ColumnSpan="2" Margin="0,40,10,10" Width="250" HorizontalAlignment="Left"
ItemTemplate="{StaticResource WineVarietyTemplate}" TextSearch.TextPath="Name"
SelectionChanged="AreaCommitmentType_Changed"/>
TextSearch.TextPath="Name"
SelectionChanged="AreaCommitmentType_Changed">
<ComboBox.ItemTemplateSelector>
<ctrl:WineVarietyTemplateSelector/>
</ComboBox.ItemTemplateSelector>
</ComboBox>
<Label Content="Attribut:" Margin="10,70,0,10"/>
<ComboBox x:Name="AreaCommitmentTypeWineAttributeInput" Grid.Column="1" Grid.ColumnSpan="2" Margin="0,70,10,10" Width="250" HorizontalAlignment="Left"