Loading files
366e28f22This file is pinned to the selected release. Download the original to open it in your design tool.
<ide:ModernWindow x:Class="IDE.Documents.Views.ItemSelectDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ide="http://xnocad.rgb/wpf"
xmlns:local="clr-namespace:IDE.Documents.Views"
xmlns:docViews="clr-namespace:IDE.Documents.Views;assembly=IDE.Core.Presentation"
xmlns:fa="http://schemas.fontawesome.com/icons/"
mc:Ignorable="d"
Title="Item Select Dialog"
WindowStartupLocation="CenterScreen"
Style="{DynamicResource EmptyDialog}"
Height="600"
Width="1000">
<ide:ModernWindow.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/IDE.Presentation;component/Resources/Styles/DesignerItems.xaml" />
<ResourceDictionary Source="pack://application:,,,/IDE.Presentation;component/Resources/DataTemplates/SchematicDesignerDataTemplates.xaml" />
<ResourceDictionary Source="pack://application:,,,/IDE.Presentation;component/Resources/DataTemplates/BoardDesignerDataTemplates.xaml" />
<ResourceDictionary Source="pack://application:,,,/IDE.Presentation;component/Resources/Styles/SchematicDesignerStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style x:Key="ClearFilterButtonStyle"
TargetType="{x:Type Button}">
<Setter Property="Background"
Value="Transparent" />
<Setter Property="BorderBrush"
Value="Transparent" />
<Setter Property="BorderThickness"
Value="1" />
<Setter Property="Height"
Value="22" />
<Setter Property="HorizontalContentAlignment"
Value="Center" />
<Setter Property="ToolTipService.InitialShowDelay"
Value="900" />
<Setter Property="ToolTipService.ShowDuration"
Value="20000" />
<Setter Property="ToolTipService.BetweenShowDelay"
Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid SnapsToDevicePixels="True">
<Border x:Name="OuterBorder"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
CornerRadius="2" />
<Border x:Name="MiddleBorder"
BorderBrush="Transparent"
BorderThickness="{TemplateBinding BorderThickness}"
Background="Transparent"
CornerRadius="2">
<Border x:Name="InnerBorder"
BorderBrush="Transparent"
BorderThickness="{TemplateBinding BorderThickness}"
Background="Transparent"
CornerRadius="2"
Padding="{TemplateBinding Padding}">
<StackPanel x:Name="StackPanel"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
<ContentPresenter x:Name="Content"
Content="{TemplateBinding Content}"
Margin="1"
RenderOptions.BitmapScalingMode="NearestNeighbor"
VerticalAlignment="Center"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</StackPanel>
</Border>
</Border>
</Grid>
<ControlTemplate.Triggers>
<!--<Trigger Property="IsMouseOver"
Value="True">
<Setter Property="Background"
TargetName="OuterBorder"
Value="{StaticResource MouseOverBackgroundBrush}" />
<Setter Property="BorderBrush"
TargetName="OuterBorder"
Value="{StaticResource MouseOverBorderBrush}" />
<Setter Property="BorderBrush"
TargetName="InnerBorder"
Value="#80FFFFFF" />
</Trigger>-->
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Opacity"
TargetName="Content"
Value="0.5" />
<Setter Property="TextElement.Foreground"
TargetName="OuterBorder"
Value="#FF9E9E9E" />
</Trigger>
<!--<Trigger Property="IsPressed"
Value="True">
<Setter Property="Background"
TargetName="OuterBorder"
Value="{StaticResource PressedBackgroundBrush}" />
<Setter Property="BorderBrush"
TargetName="OuterBorder"
Value="{StaticResource PressedBorderBrush}" />
<Setter Property="BorderBrush"
TargetName="InnerBorder"
Value="Transparent" />
</Trigger>-->
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</ide:ModernWindow.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid Grid.Row="0"
Grid.Column="0"
Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.Row="0"
Margin="0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ide:AdvancedTextBox x:Name="_txtFilter"
Background="Transparent"
Text="{Binding SearchItemsFilter, Delay=800, UpdateSourceTrigger=PropertyChanged}"
Watermark="Search items"
BorderThickness="1">
</ide:AdvancedTextBox>
<Button Grid.Column="1"
Command="{Binding ClearSearchFilterCommand}"
Style="{StaticResource ClearFilterButtonStyle}"
HorizontalAlignment="Left">
<fa:FontAwesome Icon="Solid_Times"
FontSize="16"
Foreground="{DynamicResource TextBrush}" />
</Button>
</Grid>
<TreeView ItemsSource="{Binding Libraries,IsAsync=True}"
Background="Transparent"
Grid.Row="1"
SelectedItemChanged="TreeView_SelectedItemChanged">
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsExpanded"
Value="True" />
<!-- This is to have a full selection of the tree item-->
<Style.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="Grid.ColumnSpan"
Value="2" />
</Style>
</Style.Resources>
</Style>
</TreeView.ItemContainerStyle>
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Items}">
<StackPanel Orientation="Horizontal"
Margin="3">
<Image Width="20"
Height="20"
Source="pack://application:,,,/IDE.Resources;component/Images/document.png" />
<TextBlock Text="{Binding Name, UpdateSourceTrigger=PropertyChanged}"
Margin="5,0,0,0"
VerticalAlignment="Center" />
</StackPanel>
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
</Grid>
<GridSplitter Grid.Row="0"
Width="3"
HorizontalAlignment="Right" />
<ContentControl Grid.Row="0"
Grid.Column="1"
Margin="5"
Content="{Binding SelectedItem, UpdateSourceTrigger=PropertyChanged}">
<ContentControl.Resources>
<DataTemplate DataType="{x:Type docViews:LibraryItemDisplay}">
<local:LibraryItemDisplayView />
</DataTemplate>
<DataTemplate DataType="{x:Type docViews:ComponentItemDisplay}">
<local:ComponentItemDisplayView />
</DataTemplate>
</ContentControl.Resources>
</ContentControl>
<StackPanel Orientation="Horizontal"
Grid.Row="3"
Grid.ColumnSpan="3"
HorizontalAlignment="Right">
<Button Grid.Row="1"
Grid.Column="2"
Content="OK"
Width="75"
Margin="5"
HorizontalAlignment="Left"
Click="btnOK_Click"
IsDefault="True" />
<Button Grid.Row="1"
Grid.Column="2"
Content="Cancel"
Width="75"
Margin="5"
HorizontalAlignment="Left"
IsCancel="True" />
</StackPanel>
</Grid>
</ide:ModernWindow>