84 lines
5.7 KiB
XML
84 lines
5.7 KiB
XML
<base:BaseView x:Class="RegionOfInterestChannels.RegionOfInterestChannelsView"
|
|
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:behaviors="clr-namespace:DTS.Common.Behaviors;assembly=DTS.Common"
|
|
xmlns:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
|
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
|
xmlns:strings="clr-namespace:RegionOfInterestChannels"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:RegionOfInterestChannels"
|
|
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="TextBox" BasedOn="{StaticResource TTS_TextBoxStyle}"/>
|
|
<Style TargetType="TextBlock" BasedOn="{StaticResource TTS_TextBlockStyle}">
|
|
<Setter Property="FontFamily" Value="Courier New"/>
|
|
</Style>
|
|
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
|
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
|
<local:StateListIndexConverter x:Key="StateListIndexConverter" />
|
|
<local:RegionOfInterestChannelsDataTemplateSelector x:Key="DataTemplateSelector">
|
|
<local:RegionOfInterestChannelsDataTemplateSelector.CheckBoxDataTemplate>
|
|
<DataTemplate>
|
|
<CheckBox HorizontalAlignment="Center" IsChecked="{Binding Path=Checked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="ROIChannelCheckBox">
|
|
<CheckBox.DataContext>
|
|
<MultiBinding Converter="{StaticResource StateListIndexConverter}">
|
|
<Binding Path="ROIIncludes"/>
|
|
<Binding Path="Tag" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type ContentPresenter}}" />
|
|
</MultiBinding>
|
|
</CheckBox.DataContext>
|
|
</CheckBox>
|
|
</DataTemplate>
|
|
</local:RegionOfInterestChannelsDataTemplateSelector.CheckBoxDataTemplate>
|
|
<local:RegionOfInterestChannelsDataTemplateSelector.TextBlockDataTemplate>
|
|
<DataTemplate>
|
|
<TextBlock HorizontalAlignment="Left" AutomationProperties.AutomationId="ROIChannelTextLbl"
|
|
Text="{Binding Path=Tag, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentPresenter}}, FallbackValue='???????????????A'}"
|
|
Loaded="TextBlock_Loaded" FontFamily="Courier New"/>
|
|
</DataTemplate>
|
|
</local:RegionOfInterestChannelsDataTemplateSelector.TextBlockDataTemplate>
|
|
</local:RegionOfInterestChannelsDataTemplateSelector>
|
|
</ResourceDictionary>
|
|
</base:BaseView.Resources>
|
|
<Grid Background="{StaticResource Brush_ApplicationContentBackground}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid Grid.Row="0" Grid.Column="0" >
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Label Style="{StaticResource SimpleHeader}" Grid.Row="0"
|
|
Content="{local:TranslateExtension Title}"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Top" AutomationProperties.AutomationId="ROIChannelsTitleLabel" />
|
|
<ListView Grid.Row="1" ItemsSource="{Binding ChannelList, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="ROIChannelsListView" GridViewColumnHeader.Click="GridViewColumnHeader_OnClick"
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto">
|
|
<ListView.ItemContainerStyle>
|
|
<Style TargetType="{x:Type ListViewItem}" BasedOn="{StaticResource TTS_ListViewItemStyle}">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="FontFamily" Value="Courier New" />
|
|
</Style>
|
|
</ListView.ItemContainerStyle>
|
|
<ListView.View>
|
|
<controls:AutoSizedGridView local:GridViewColumns.HeaderTextMember="HeaderText"
|
|
local:GridViewColumns.DisplayMember="DisplayMember"
|
|
local:GridViewColumns.ColumnsSource="{Binding Columns}"
|
|
local:GridViewColumns.CellDataTemplateSelector="{StaticResource DataTemplateSelector}"/>
|
|
</ListView.View>
|
|
</ListView>
|
|
</Grid>
|
|
</Grid>
|
|
</base:BaseView>
|