终端一体化运控平台
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 

154 Zeilen
7.4 KiB

  1. <Window x:Class="BPASmart.RecipeManagement.View.PropertySetting"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:BPASmart.RecipeManagement.View"
  7. xmlns:vm="clr-namespace:BPASmart.RecipeManagement.ViewModel"
  8. mc:Ignorable="d"
  9. Title="ProperlySetting" Height="500" Width="600" WindowStyle="None" AllowsTransparency="True" Background="#264c73" Foreground="#FF2AB2E7"
  10. WindowStartupLocation="CenterScreen" MouseLeftButtonDown="Window_MouseLeftButtonDown">
  11. <Window.DataContext>
  12. <vm:PropertySettingViewModel/>
  13. </Window.DataContext>
  14. <Border>
  15. <Border.Background>
  16. <ImageBrush ImageSource="../image/矩形.png"/>
  17. </Border.Background>
  18. <Grid>
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="40"/>
  21. <RowDefinition Height="200"/>
  22. <RowDefinition/>
  23. </Grid.RowDefinitions>
  24. <Border>
  25. <TextBlock Text="原料扩展属性" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="22" Margin="0,10,0,0"/>
  26. </Border>
  27. <Grid Grid.Row="1" Margin="0,0,0,10">
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="49*"/>
  30. <RowDefinition Height="30"/>
  31. <RowDefinition Height="120*"/>
  32. </Grid.RowDefinitions>
  33. <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Height="29" Width="586">
  34. <TextBlock Text="属性名称:" FontSize="18" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10,0,0,0"/>
  35. <TextBox Text="{Binding PropertyName }" FontSize="18" Width="150" Margin="20,0" Style="{DynamicResource CommonTextBox}"/>
  36. <Button Content="保存" Style="{DynamicResource ButtonStyle}" FontSize="18" Width="120" Margin="20,0" Command="{Binding SaveCommand}"/>
  37. <Button Content="关闭" Style="{DynamicResource ButtonStyle}" FontSize="18" Width="120" Margin="20,0,0,0" Click="Button_Click"/>
  38. </StackPanel>
  39. <TextBlock Grid.Row="1" Text="{Binding ErrorName}" Foreground="Red" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  40. <StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Height="100" Width="506">
  41. <TextBlock Text="属性说明:" FontSize="18" Margin="0,0,30,0"/>
  42. <TextBox Text="{Binding PropertyDescription}" FontSize="18" Width="400" Height="100" TextWrapping="Wrap" Style="{DynamicResource CommonTextBox}"
  43. VerticalContentAlignment="Top"/>
  44. </StackPanel>
  45. </Grid>
  46. <Grid Grid.Row="2">
  47. <Grid.RowDefinitions>
  48. <RowDefinition Height="30"/>
  49. <RowDefinition />
  50. </Grid.RowDefinitions>
  51. <Grid Background="#dd2AB2E7" x:Name="grid">
  52. <Grid.ColumnDefinitions>
  53. <ColumnDefinition Width="120" />
  54. <ColumnDefinition Width="*"/>
  55. <ColumnDefinition Width="120"/>
  56. </Grid.ColumnDefinitions>
  57. <TextBlock
  58. Grid.Column="0"
  59. HorizontalAlignment="Center"
  60. VerticalAlignment="Center"
  61. FontSize="16"
  62. Foreground="White"
  63. Text="属性名" />
  64. <Grid Grid.Column="1">
  65. <TextBlock
  66. HorizontalAlignment="Center"
  67. VerticalAlignment="Center"
  68. FontSize="16"
  69. Foreground="White"
  70. Text="属性说明" />
  71. <Border
  72. BorderBrush="white"
  73. BorderThickness="1,0,1,0"
  74. Cursor="SizeWE" />
  75. </Grid>
  76. <TextBlock
  77. Grid.Column="2"
  78. HorizontalAlignment="Center"
  79. VerticalAlignment="Center"
  80. FontSize="16"
  81. Foreground="white"
  82. Text="删除" />
  83. </Grid>
  84. <ScrollViewer
  85. Grid.Row="1"
  86. HorizontalScrollBarVisibility="Hidden"
  87. VerticalScrollBarVisibility="Hidden">
  88. <ListBox ItemsSource="{Binding properties}" x:Name="lb" BorderBrush="Transparent"
  89. ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden"
  90. Background="Transparent" Foreground="#FF2AB2E7" >
  91. <ListBox.ItemTemplate>
  92. <DataTemplate>
  93. <Grid x:Name="gr" Height="30" Width="600" >
  94. <Grid.ColumnDefinitions>
  95. <ColumnDefinition Width="120"/>
  96. <ColumnDefinition Width="*"/>
  97. <ColumnDefinition Width="120"/>
  98. </Grid.ColumnDefinitions>
  99. <TextBlock
  100. Grid.Column="0"
  101. HorizontalAlignment="Center"
  102. VerticalAlignment="Center"
  103. Background="Transparent"
  104. FontSize="14"
  105. Text="{Binding PropertyName}" />
  106. <Grid Grid.Column="1">
  107. <TextBlock
  108. Margin="5,0,0,0"
  109. VerticalAlignment="Center"
  110. HorizontalAlignment="Center"
  111. Background="Transparent"
  112. FontSize="14"
  113. Text="{Binding PropertyDescription}" />
  114. </Grid>
  115. <Button
  116. Grid.Column="2"
  117. Margin="5,0,0,0"
  118. VerticalAlignment="Center"
  119. Width="80"
  120. Style="{DynamicResource CommonButton}"
  121. Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
  122. CommandParameter="{Binding DataContext.PropertyId, RelativeSource={RelativeSource AncestorType=ListBoxItem,Mode=FindAncestor}}"
  123. Content="删除" />
  124. </Grid>
  125. <DataTemplate.Triggers>
  126. <Trigger Property="IsMouseOver" Value="true">
  127. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  128. </Trigger>
  129. </DataTemplate.Triggers>
  130. </DataTemplate>
  131. </ListBox.ItemTemplate>
  132. </ListBox>
  133. </ScrollViewer>
  134. </Grid>
  135. </Grid>
  136. </Border>
  137. </Window>