-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathSettingsMenu.xaml
29 lines (29 loc) · 1.44 KB
/
SettingsMenu.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<UserControl x:Class="EditorDemo.SettingsMenu"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:EditorDemo"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<local:BoolToVisibilityConverter x:Key="converter" />
</UserControl.Resources>
<StackPanel>
<StackPanel Background="CornflowerBlue">
<CheckBox Foreground="White" Margin="5" Content="Snapping Enabled " IsChecked="{Binding IsSnappingEnabled}"/>
</StackPanel>
<ListView ItemsSource="{Binding SnapSourceSettings}" Visibility="{Binding IsSnappingEnabled, Converter={StaticResource converter}}">
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="Focusable" Value="false"/>
</Style>
</ListView.ItemContainerStyle>
<ListView.ItemTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding IsEnabled}" Content="{Binding Source.Name}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackPanel>
</UserControl>