| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- <windows:WindowBase x:Class="Muchinfo.MTPClient.UI.Views.FocusGoodsSelectView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:command="http://www.galasoft.ch/mvvmlight"
- xmlns:data="clr-namespace:Muchinfo.MTPClient.Data;assembly=Muchinfo.MTPClient.Data"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
- xmlns:resource="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Muchinfo.MTPClient.Resources"
- xmlns:windows="clr-namespace:Muchinfo.WPF.Controls.Windows;assembly=Muchinfo.WPF.Controls"
- x:Name="FocusGoodsView"
- Title="{x:Static resource:Muchinfo_Resource.FocusGoodsSelect_Title}"
- Width="450"
- Height="350"
- Style="{DynamicResource WindowBaseStyle}">
- <Grid Margin="20,10">
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="3*" />
- <ColumnDefinition Width="2*" />
- <ColumnDefinition Width="3*" />
- </Grid.ColumnDefinitions>
- <TreeView x:Name="ExchangeTreeView"
- ItemsSource="{Binding ExchangeList}"
- SelectedValuePath="Key">
- <TreeView.ItemContainerStyle>
- <Style TargetType="TreeViewItem">
- <Setter Property="TreeViewItem.IsExpanded" Value="True" />
- </Style>
- </TreeView.ItemContainerStyle>
- <TreeView.ItemTemplate>
- <HierarchicalDataTemplate DataType="{x:Type data:TreeViewEntity}" ItemsSource="{Binding Path=Children}">
- <StackPanel Orientation="Horizontal">
- <TextBlock VerticalAlignment="Center" Text="{Binding Value}" />
- </StackPanel>
- </HierarchicalDataTemplate>
- </TreeView.ItemTemplate>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="MouseDoubleClick">
- <command:EventToCommand Command="{Binding InCommand}" CommandParameter="{Binding Path=SelectedItem, ElementName=ExchangeTreeView}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </TreeView>
- <Grid Grid.Row="0" Grid.Column="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <StackPanel Margin="0,20,0,0" Orientation="Vertical">
- <Button x:Name="InButton"
- Width="70"
- Margin="0,10,0,10"
- Background="{DynamicResource MuchinfoBrush13}"
- Command="{Binding InCommand}"
- CommandParameter="{Binding Path=SelectedItem,
- ElementName=ExchangeTreeView}"
- Padding="3"
- Style="{StaticResource CommonButtonStyle}">
- <Button.Content>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="{x:Static resource:Muchinfo_Resource.Button_InSelected}" />
- <TextBlock Text=">>" />
- </StackPanel>
- </Button.Content>
- </Button>
- <Button x:Name="OutButton"
- Width="70"
- Margin="0,0,0,10"
- Background="{DynamicResource MuchinfoBrush13}"
- Command="{Binding OutCommand}"
- CommandParameter="{Binding Path=SelectedItem,
- ElementName=SelectedListBox}"
- Padding="3"
- Style="{StaticResource CommonButtonStyle}">
- <Button.Content>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="<<" />
- <TextBlock Text="{x:Static resource:Muchinfo_Resource.Button_OutSelected}" />
- </StackPanel>
- </Button.Content>
- </Button>
- </StackPanel>
- <StackPanel Grid.Row="2"
- Margin="0,0,0,20"
- Orientation="Vertical">
- <Button x:Name="UpButton"
- Width="70"
- Margin="0,10,0,10"
- Background="{DynamicResource MuchinfoBrush13}"
- Command="{Binding UpCommand}"
- CommandParameter="{Binding ElementName=SelectedListBox}"
- Content="{x:Static resource:Muchinfo_Resource.Button_Up}"
- Padding="3"
- Style="{StaticResource CommonButtonStyle}" />
- <Button x:Name="DownButton"
- Width="70"
- Margin="0,0,0,10"
- Background="{DynamicResource MuchinfoBrush13}"
- Command="{Binding DownCommand}"
- CommandParameter="{Binding ElementName=SelectedListBox}"
- Content="{x:Static resource:Muchinfo_Resource.Button_Down}"
- Padding="3"
- Style="{StaticResource CommonButtonStyle}" />
- </StackPanel>
- </Grid>
- <ListBox x:Name="SelectedListBox"
- Grid.Row="0"
- Grid.Column="2"
- DisplayMemberPath="Value"
- ItemsSource="{Binding SelectedItems}"
- SelectedItem="{Binding CurrentListViewEntity,
- Mode=TwoWay}"
- SelectedValuePath="Key"
- SelectionMode="Single">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="MouseDoubleClick">
- <command:EventToCommand Command="{Binding OutCommand}" CommandParameter="{Binding Path=SelectedItem, ElementName=SelectedListBox}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </ListBox>
- <StackPanel Grid.Row="1"
- Grid.Column="1"
- Grid.ColumnSpan="2"
- Margin="0,10,0,0"
- HorizontalAlignment="Right"
- Orientation="Horizontal">
- <Button x:Name="OkButton"
- Width="70"
- Background="{DynamicResource MuchinfoBrush13}"
- Command="{Binding OKCommand}"
- CommandParameter="{Binding ElementName=FocusGoodsView}"
- Content="{x:Static resource:Muchinfo_Resource.Button_Confirm}"
- IsDefault="True"
- Padding="5"
- Style="{StaticResource CommonButtonStyle}" />
- <Button x:Name="CancelButton"
- Width="70"
- Margin="10,0,0,0"
- Background="{DynamicResource MuchinfoBrush13}"
- Command="{Binding CancelCommand}"
- CommandParameter="{Binding ElementName=FocusGoodsView}"
- Content="{x:Static resource:Muchinfo_Resource.Button_Cancel}"
- Padding="5"
- Style="{StaticResource CommonButtonStyle}" />
- </StackPanel>
- </Grid>
- </windows:WindowBase>
|