Loading files
<UserControl x:Class="IDE.Documents.Views.LayersToolWindow"
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:IDE.Documents.Views"
xmlns:conv="clr-namespace:IDE.Core.Converters"
xmlns:ide="http://xnocad.rgb/wpf"
xmlns:ctrls="clr-namespace:IDE.Controls"
xmlns:fa="http://schemas.fontawesome.com/icons/"
xmlns:strings="clr-namespace:IDE.Core.Presentation.Resources;assembly=IDE.Core.Presentation"
mc:Ignorable="d"
Background="Transparent"
d:DesignHeight="300"
d:DesignWidth="300">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal"
Margin="0,5">
<ToggleButton IsChecked="{Binding LayeredDocument.MaskUnselectedLayer, UpdateSourceTrigger=PropertyChanged}"
ToolTip="{x:Static strings:Strings.LayersToolWindow_MaskUnselectedLayers}">
<ToggleButton.Template>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<fa:FontAwesome Name="PART_Path"
Icon="Solid_WindowMaximize"
FontSize="16"
Foreground="DarkGray" />
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding LayeredDocument.MaskUnselectedLayer}"
Value="True">
<Setter TargetName="PART_Path"
Property="Foreground"
Value="White" />
</DataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
<ToggleButton Margin="5,0,0,0"
IsChecked="{Binding LayeredDocument.HideUnselectedLayer, UpdateSourceTrigger=PropertyChanged}"
ToolTip="{x:Static strings:Strings.LayersToolWindow_HideUnselectedLayers}"
Padding="0">
<ToggleButton.Template>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<fa:FontAwesome Name="PART_Path"
Icon="Solid_WindowMinimize"
FontSize="16"
Foreground="DarkGray" />
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding LayeredDocument.HideUnselectedLayer}"
Value="True">
<Setter TargetName="PART_Path"
Property="Foreground"
Value="White" />
</DataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
</StackPanel>
<StackPanel Grid.Row="1">
<ComboBox x:Name="PART_LayerGroups"
ItemsSource="{Binding LayeredDocument.LayerGroups}"
SelectedItem="{Binding LayeredDocument.SelectedLayerGroup, UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="Name" />
</StackPanel>
<ListView Grid.Row="2"
Margin="0,10,0,0"
SelectionMode="Single"
ItemsSource="{Binding LayeredDocument.SelectedLayerGroup.Layers}"
SelectedItem="{Binding LayeredDocument.SelectedLayer, UpdateSourceTrigger=PropertyChanged}"
SelectedIndex="0">
<ListView.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="32" />
<ColumnDefinition Width="32" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="75" />
</Grid.ColumnDefinitions>
<ToggleButton Grid.Column="0"
IsChecked="{Binding IsSetVisible, UpdateSourceTrigger=PropertyChanged}"
VerticalAlignment="Center">
<ToggleButton.Template>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<fa:FontAwesome Icon="Solid_Eye"
Name="PART_Eye"
FontSize="12"
Foreground="{DynamicResource TextBrush}" />
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding IsSetVisible}"
Value="False">
<Setter TargetName="PART_Eye"
Property="Opacity"
Value="0.5" />
</DataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
<ide:ColorPicker Grid.Column="1"
SelectedColor="{Binding LayerColor, Converter={x:Static conv:XColorToColorConverter.Instance}, UpdateSourceTrigger=PropertyChanged, FallbackValue=White}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
ShowDropDownButton="False"
BorderBrush="Transparent"
Width="22" />
<ctrls:EditableLabel Grid.Column="2"
Text="{Binding LayerName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
DisplayText="{Binding LayerName, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
FontSize="12"
FontFamily="Segoe UI"
Focusable="True"
IsReadOnly="False"
VerticalAlignment="Center"
HorizontalAlignment="Left"
ToolTipService.ShowOnDisabled="True" />
<TextBlock Grid.Column="3"
VerticalAlignment="Center"
Text="{Binding LayerType, UpdateSourceTrigger=PropertyChanged}" />
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</UserControl>
366e28f22This file is pinned to the selected release. Download the original to open it in your design tool.