12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <UserControl x:Class="VirgoUI.Client.Dialog.ItemsSelectDialogView"
- 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:VirgoUI.Client.Dialog"
- mc:Ignorable="d"
- xmlns:ts="clr-namespace:OpenSEMI.ClientBase.Command"
- d:DesignHeight="300" d:DesignWidth="300">
- <Grid SnapsToDevicePixels="True">
- <Grid Margin="10">
- <Grid.RowDefinitions>
- <RowDefinition Height="350"/>
- <RowDefinition Height="50"/>
- </Grid.RowDefinitions>
- <DataGrid Name="SequenceFileList" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" AutoGenerateColumns="False" CanUserAddRows="False"
- ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedName}" Width="315" Height="416">
- <DataGrid.Columns>
- <DataGridTemplateColumn Header="Name" Width="200" >
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding }" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- <ts:CommandSource.Trigger>
- <ts:CommandTriggerGroup>
- <ts:EventCommandTrigger RoutedEvent="DataGrid.MouseDoubleClick" CustomParameter="{Binding SelectedItem,ElementName=SequenceFileList}"
- Command="{Binding DataContext.ListViewDoubleClick,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" />
- </ts:CommandTriggerGroup>
- </ts:CommandSource.Trigger>
- </DataGrid>
- <StackPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
- <Button Content="Select" Command="{Binding SelectCommand}" HorizontalAlignment="Left" Height="35" Width="80" />
- <Button Content="Cancel" Command="{Binding CancelCommand}" HorizontalAlignment="Left" Height="35" Width="80" Margin="5,0,0,0" />
- </StackPanel>
- </Grid>
- </Grid>
- </UserControl>
|