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