Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ListBox x:Name="_listBox">
- <ListBox.ItemContainerStyle>
- <Style TargetType="ListBoxItem">
- <Setter Property="IsEnabled" Value="False"/>
- </Style>
- </ListBox.ItemContainerStyle>
- </ListBox>
- <ListBox x:Name="_listBox">
- <ListBox.ItemContainerStyle>
- <Style TargetType="ListBoxItem">
- <Setter Property="IsEnabled" Value="False"/>
- <Style.Triggers>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Foreground" Value="Red" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </ListBox.ItemContainerStyle>
- </ListBox>
- <ItemsControl DataContext="{Binding Source={StaticResource Things}}" ItemsSource="{Binding}" Margin="0">
- <ItemsControl.Resources>
- <local:SelectedConverter x:Key="conv"/>
- </ItemsControl.Resources>
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <local:Control Background="{Binding Path=IsSelected, Converter={StaticResource conv}}"/>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- private void lstSMTs_PreviewMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
- {
- e.Handled = !editRights;
- }
Add Comment
Please, Sign In to add comment