Use ViewModelListBox dynamic resource.
This commit is contained in:
parent
8d6ed32a84
commit
33d453cf73
@ -26,16 +26,7 @@
|
||||
Title="Stil auswählen"
|
||||
>
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/zaaReloaded2;component/style.xaml" />
|
||||
<ResourceDictionary>
|
||||
<Style x:Key="settingsListItem" TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="IsSelected" Value="{Binding Path=IsSelected, Mode=TwoWay}" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
<StackPanel Margin="10">
|
||||
<Label Target="{Binding ElementName=settingsList}">Bitte Stil auswählen:</Label>
|
||||
@ -51,7 +42,7 @@
|
||||
<StackPanel>
|
||||
<ListBox ItemsSource="{Binding SettingsList}"
|
||||
DisplayMemberPath="Name"
|
||||
ItemContainerStyle="{StaticResource settingsListItem}"
|
||||
ItemContainerStyle="{DynamicResource ResourceKey=ViewModelListBox}"
|
||||
x:Name="settingsList"
|
||||
MinWidth="240" MinHeight="240" />
|
||||
</StackPanel>
|
||||
|
Loading…
Reference in New Issue
Block a user