|
- <UserControl
- x:Class="BPASmartClient.DosingSystem.View.OutletManagementView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:con="clr-namespace:BPASmartClient.CustomResource.Converters;assembly=BPASmartClient.CustomResource"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
- d:DesignHeight="450"
- d:DesignWidth="800"
- mc:Ignorable="d">
-
- <UserControl.DataContext>
- <vm:OutletManagementViewModel />
- </UserControl.DataContext>
-
- <Grid Margin="10">
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
- <Button
- Width="150"
- Height="40"
- Margin="10,0,10,0"
- Command="{Binding AddCommand}"
- Content="添加出料口"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
- <Button
- Width="150"
- Height="40"
- Margin="10,0,10,0"
- Command="{Binding SaveCommand}"
- Content="保存参数"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
- </StackPanel>
-
- <Grid Grid.Row="1">
- <ListView
- Margin="10"
- Background="Transparent"
- BorderBrush="#00BEFA"
- BorderThickness="0"
- ItemsSource="{Binding OutletInfoModels}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Horizontal" />
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
-
- <ListView.ItemTemplate>
- <DataTemplate>
- <Border
- Name="ShadowElement"
- Width="180"
- Height="150"
- Margin="10"
- VerticalAlignment="Top"
- BorderBrush="#00BEFA"
- BorderThickness="0"
- ClipToBounds="True"
- CornerRadius="0">
- <Border.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/蓝色背景.png" Stretch="Fill" />
- </Border.Background>
-
- <Grid Margin="20,0">
-
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <TextBlock
- Grid.Row="0"
- Grid.ColumnSpan="2"
- Margin="0,10,0,0"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="#00BEFA"
- Text="{Binding OutletName}" />
-
- <StackPanel
- Grid.Row="1"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- Grid.Row="1"
- FontSize="14"
- Foreground="#aa00BEFA"
- Text="出料口位置:" />
- <TextBlock
- Grid.Row="1"
- FontSize="14"
- Foreground="#aa00BEFA"
- Text="{Binding OutletLoc}" />
- </StackPanel>
-
- <Grid
- Name="gr"
- Grid.Row="2"
- Height="30"
- Margin="0,0,0,10">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <pry:IcoButton
- Width="{Binding ElementName=gr, Path=ActualWidth}"
- Height="{Binding ElementName=gr, Path=ActualHeight}"
- Margin="4,4,3,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="#11F53F62"
- BorderThickness="0"
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
- CommandParameter="{Binding OutletName}"
- Content="删除"
- EnterBackground="#22F53F62"
- FontStyle="Normal"
- Foreground="#FFF53F62"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />
-
- <pry:IcoButton
- Grid.Column="1"
- Width="{Binding ElementName=gr, Path=ActualWidth}"
- Height="{Binding ElementName=gr, Path=ActualHeight}"
- Margin="3,4,4,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="#112AB2E7"
- BorderThickness="0"
- Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
- CommandParameter="{Binding OutletName}"
- Content="编辑"
- EnterBackground="#222AB2E7"
- Foreground="#FF2AB2E7"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />
-
- </Grid>
- </Grid>
- </Border>
-
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </Grid>
-
-
- </Grid>
- </UserControl>
|