92 lines
7.1 KiB
Plaintext
92 lines
7.1 KiB
Plaintext
|
|
<base:BaseView x:Class="ExtraProperties.ExtraPropertiesListView"
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||
|
|
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||
|
|
xmlns:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||
|
|
xmlns:behaviors="clr-namespace:DTS.Common.Behaviors;assembly=DTS.Common"
|
||
|
|
xmlns:strings="clr-namespace:ExtraProperties"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
|
|
xmlns:local="clr-namespace:ExtraProperties"
|
||
|
|
mc:Ignorable="d"
|
||
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
||
|
|
<base:BaseView.Resources>
|
||
|
|
<ResourceDictionary>
|
||
|
|
<ResourceDictionary.MergedDictionaries>
|
||
|
|
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||
|
|
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Controls/combobox.xaml"/>
|
||
|
|
</ResourceDictionary.MergedDictionaries>
|
||
|
|
<Style TargetType="ListView">
|
||
|
|
<Setter Property="ItemContainerStyle" Value="{StaticResource TTS_ListViewItemStyle}"/>
|
||
|
|
</Style>
|
||
|
|
<Style TargetType="TextBox" BasedOn="{StaticResource TTS_TextBoxStyle}"/>
|
||
|
|
<Style TargetType="TextBlock" BasedOn="{StaticResource TTS_TextBlockStyle}"/>
|
||
|
|
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
||
|
|
<Style TargetType="ComboBox" BasedOn="{StaticResource TTS_ComboBoxStyle}"/>
|
||
|
|
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||
|
|
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||
|
|
<Style TargetType="RadioButton" BasedOn="{StaticResource FlatRadioButtonStyle}" >
|
||
|
|
<Setter Property="Height" Value="24" />
|
||
|
|
<Setter Property="Margin" Value="5" />
|
||
|
|
</Style>
|
||
|
|
<converters:StatusToBorderThicknessConverter x:Key="StatusToBorderThickness" />
|
||
|
|
<converters:StatusToColorConverter x:Key="StatusToColor" />
|
||
|
|
<converters:InverseBooleanConverter x:Key="InverseBooleanConverter" />
|
||
|
|
</ResourceDictionary>
|
||
|
|
</base:BaseView.Resources>
|
||
|
|
<Grid Background="{DynamicResource Brush_ApplicationContentBackground}" ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Auto">
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="*" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<ListView ItemsSource="{Binding ExtraProperties, UpdateSourceTrigger=PropertyChanged}" Grid.Row="1"
|
||
|
|
AutomationProperties.AutomationId="ExtraPropertiesLv" SelectionMode="Extended" SelectionChanged="ExtraProperties_SelectionChanged"
|
||
|
|
KeyboardNavigation.TabNavigation="Continue" x:Name="ExtraPropertiesListViewLV" PreviewMouseLeftButtonUp="ExtraPropertiesListView_PreviewMouseLeftButtonUp">
|
||
|
|
<ListView.ItemContainerStyle>
|
||
|
|
<Style>
|
||
|
|
<Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
|
||
|
|
</Style>
|
||
|
|
</ListView.ItemContainerStyle>
|
||
|
|
<ListView.View>
|
||
|
|
<controls:AutoSizedGridView AutomationProperties.AutomationId="ExtraPropertiesListGridView">
|
||
|
|
<GridViewColumn AutomationProperties.AutomationId="KeyColumn" Width="315">
|
||
|
|
<GridViewColumn.Header>
|
||
|
|
<controls:GridViewColumnHeaderSearchable Tag="ExtraPropertyKey" HeaderTitle="{strings:TranslateExtension Key}" Search="GridViewColumnHeaderSearchable_OnSearch"
|
||
|
|
ListviewId="{Binding ListViewId}" x:Name="KeyColumnHeader" ClickHandler="GridViewColumnHeader_OnClick"/>
|
||
|
|
</GridViewColumn.Header>
|
||
|
|
<GridViewColumn.CellTemplate>
|
||
|
|
<ItemContainerTemplate>
|
||
|
|
<TextBox Width="300" AutomationProperties.AutomationId="ExtraPropertyKeyTextBox"
|
||
|
|
Text="{Binding Key, UpdateSourceTrigger=PropertyChanged}" KeyDown="ExtraPropertyKeyTextBox_KeyDown"
|
||
|
|
TextChanged="ExtraPropertyKeyTextBox_TextChanged" MaxLength="250"
|
||
|
|
behaviors:TextBoxPasteBehavior.PasteCommand="{Binding PasteCommand}" Tag="ExtraPropertyKey"
|
||
|
|
BorderBrush="{Binding ItemStatus, Converter={StaticResource StatusToColor}}"
|
||
|
|
BorderThickness="{Binding ItemStatus, Converter={StaticResource StatusToBorderThickness}}"
|
||
|
|
IsEnabled="{Binding DataContext.IsReadOnly, Converter={StaticResource InverseBooleanConverter}, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}" />
|
||
|
|
</ItemContainerTemplate>
|
||
|
|
</GridViewColumn.CellTemplate>
|
||
|
|
</GridViewColumn>
|
||
|
|
|
||
|
|
<GridViewColumn AutomationProperties.AutomationId="DisplayNameColumn" Width="315">
|
||
|
|
<GridViewColumn.Header>
|
||
|
|
<controls:GridViewColumnHeaderSearchable Tag="ExtraPropertyValue" HeaderTitle="{strings:TranslateExtension Value}" Search="GridViewColumnHeaderSearchable_OnSearch"
|
||
|
|
ListviewId="{Binding ListViewId}" x:Name="ValueColumnHeader"/>
|
||
|
|
</GridViewColumn.Header>
|
||
|
|
<GridViewColumn.CellTemplate>
|
||
|
|
<ItemContainerTemplate>
|
||
|
|
<TextBox Width="300" AutomationProperties.AutomationId="DisplayNameTextBox"
|
||
|
|
Text="{Binding Value, UpdateSourceTrigger=PropertyChanged}" KeyDown="ExtraPropertyValueTextBox_KeyDown"
|
||
|
|
TextChanged="ExtraPropertyValueTextBox_TextChanged" MaxLength="250"
|
||
|
|
behaviors:TextBoxPasteBehavior.PasteCommand="{Binding PasteCommand}" Tag="ExtraPropertyValue"
|
||
|
|
BorderBrush="{Binding ItemStatus, Converter={StaticResource StatusToColor}}"
|
||
|
|
BorderThickness="{Binding ItemStatus, Converter={StaticResource StatusToBorderThickness}}"
|
||
|
|
IsEnabled="{Binding DataContext.IsReadOnly, Converter={StaticResource InverseBooleanConverter}, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}" />
|
||
|
|
</ItemContainerTemplate>
|
||
|
|
</GridViewColumn.CellTemplate>
|
||
|
|
</GridViewColumn>
|
||
|
|
</controls:AutoSizedGridView>
|
||
|
|
</ListView.View>
|
||
|
|
</ListView>
|
||
|
|
</Grid>
|
||
|
|
</base:BaseView>
|