|
- <Window x:Class="BPASmart.RecipeManagement.View.PropertySetting"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:BPASmart.RecipeManagement.View"
- xmlns:vm="clr-namespace:BPASmart.RecipeManagement.ViewModel"
- mc:Ignorable="d"
- Title="ProperlySetting" Height="500" Width="600" WindowStyle="None" AllowsTransparency="True" Background="#264c73" Foreground="#FF2AB2E7"
- WindowStartupLocation="CenterScreen" MouseLeftButtonDown="Window_MouseLeftButtonDown">
- <Window.DataContext>
- <vm:PropertySettingViewModel/>
- </Window.DataContext>
- <Border>
- <Border.Background>
- <ImageBrush ImageSource="../image/矩形.png"/>
- </Border.Background>
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="40"/>
- <RowDefinition Height="200"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Border>
-
- <TextBlock Text="原料扩展属性" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="22" Margin="0,10,0,0"/>
- </Border>
- <Grid Grid.Row="1" Margin="0,0,0,10">
- <Grid.RowDefinitions>
- <RowDefinition Height="49*"/>
- <RowDefinition Height="30"/>
- <RowDefinition Height="120*"/>
-
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Height="29" Width="586">
- <TextBlock Text="属性名称:" FontSize="18" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10,0,0,0"/>
- <TextBox Text="{Binding PropertyName }" FontSize="18" Width="150" Margin="20,0" Style="{DynamicResource CommonTextBox}"/>
- <Button Content="保存" Style="{DynamicResource ButtonStyle}" FontSize="18" Width="120" Margin="20,0" Command="{Binding SaveCommand}"/>
- <Button Content="关闭" Style="{DynamicResource ButtonStyle}" FontSize="18" Width="120" Margin="20,0,0,0" Click="Button_Click"/>
- </StackPanel>
-
- <TextBlock Grid.Row="1" Text="{Binding ErrorName}" Foreground="Red" VerticalAlignment="Center" HorizontalAlignment="Center"/>
- <StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Height="100" Width="506">
- <TextBlock Text="属性说明:" FontSize="18" Margin="0,0,30,0"/>
- <TextBox Text="{Binding PropertyDescription}" FontSize="18" Width="400" Height="100" TextWrapping="Wrap" Style="{DynamicResource CommonTextBox}"
- VerticalContentAlignment="Top"/>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="2">
- <Grid.RowDefinitions>
- <RowDefinition Height="30"/>
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <Grid Background="#dd2AB2E7" x:Name="grid">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="120" />
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="120"/>
- </Grid.ColumnDefinitions>
- <TextBlock
- Grid.Column="0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="White"
- Text="属性名" />
-
- <Grid Grid.Column="1">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="White"
- Text="属性说明" />
- <Border
- BorderBrush="white"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBlock
- Grid.Column="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="16"
- Foreground="white"
- Text="删除" />
- </Grid>
- <ScrollViewer
- Grid.Row="1"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden">
- <ListBox ItemsSource="{Binding properties}" x:Name="lb" BorderBrush="Transparent"
- ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden"
- Background="Transparent" Foreground="#FF2AB2E7" >
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid x:Name="gr" Height="30" Width="600" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="120"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="120"/>
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Grid.Column="0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="Transparent"
- FontSize="14"
- Text="{Binding PropertyName}" />
-
- <Grid Grid.Column="1">
- <TextBlock
- Margin="5,0,0,0"
- VerticalAlignment="Center"
- HorizontalAlignment="Center"
- Background="Transparent"
- FontSize="14"
- Text="{Binding PropertyDescription}" />
- </Grid>
-
-
- <Button
- Grid.Column="2"
- Margin="5,0,0,0"
- VerticalAlignment="Center"
- Width="80"
- Style="{DynamicResource CommonButton}"
- Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
- CommandParameter="{Binding DataContext.PropertyId, RelativeSource={RelativeSource AncestorType=ListBoxItem,Mode=FindAncestor}}"
- Content="删除" />
-
-
- </Grid>
-
- <DataTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
- </Trigger>
- </DataTemplate.Triggers>
-
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </ScrollViewer>
- </Grid>
- </Grid>
- </Border>
-
- </Window>
|