Use ViewModelListBox dynamic resource.
This commit is contained in:
		@@ -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>
 | 
			
		||||
        <ResourceDictionary Source="/zaaReloaded2;component/style.xaml" />
 | 
			
		||||
    </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>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user