ProductDescription.xaml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <UserControl x:Class="TeamAAS_VP.Views.Product.ProductDescription"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:prism="http://prismlibrary.com/"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  8. xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
  9. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  10. xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Product"
  11. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  12. lex:LocalizeDictionary.DesignCulture="zh-CN"
  13. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  14. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  15. prism:ViewModelLocator.AutoWireViewModel="True"
  16. mc:Ignorable="d"
  17. d:DataContext="{d:DesignInstance Type=vm:ProductDescriptionViewModel}"
  18. d:Height="600"
  19. d:Width="1024"
  20. d:Background="White"
  21. FontFamily="{DynamicResource DefaultFont}">
  22. <b:Interaction.Triggers>
  23. <b:EventTrigger EventName="Loaded">
  24. <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
  25. </b:EventTrigger>
  26. </b:Interaction.Triggers>
  27. <Grid>
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="auto" />
  30. <RowDefinition Height="*" />
  31. <RowDefinition Height="auto" />
  32. </Grid.RowDefinitions>
  33. <Button Grid.Row="0"
  34. Content="{materialDesign:PackIcon Kind=ArrowLeftCircle}"
  35. Width="50"
  36. HorizontalAlignment="Left"
  37. VerticalAlignment="Top"
  38. ToolTip="{lex:Loc 返回}"
  39. Style="{StaticResource MaterialDesignIconButton}"
  40. Command="{Binding BackCommand}" />
  41. <StackPanel Grid.Row="0"
  42. Orientation="Horizontal"
  43. Margin="50,0"
  44. VerticalAlignment="Center">
  45. <materialDesign:PackIcon Kind="CubeOutline"
  46. Width="30"
  47. Height="30" />
  48. <TextBlock Text="{Binding SelectProduct.Name}"
  49. VerticalAlignment="Center" />
  50. <TextBlock Text="{lex:Loc 产品描述,Converter={StaticResource StringFormatConverter},ConverterParameter=' - {0}'}"
  51. VerticalAlignment="Center" />
  52. </StackPanel>
  53. <StackPanel Orientation="Horizontal"
  54. VerticalAlignment="Center"
  55. HorizontalAlignment="Right">
  56. </StackPanel>
  57. <Border BorderThickness="1,1,1,1"
  58. VerticalAlignment="Bottom"
  59. Height="1">
  60. <Border.BorderBrush>
  61. <VisualBrush>
  62. <VisualBrush.Visual>
  63. <Rectangle StrokeDashArray="4 4"
  64. Stroke="LightGray"
  65. StrokeThickness="1"
  66. Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
  67. Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}" />
  68. </VisualBrush.Visual>
  69. </VisualBrush>
  70. </Border.BorderBrush>
  71. </Border>
  72. <Grid Grid.Row="1">
  73. <Grid.ColumnDefinitions>
  74. <ColumnDefinition Width="auto" />
  75. <ColumnDefinition Width="*" />
  76. </Grid.ColumnDefinitions>
  77. <Expander Grid.Column="0"
  78. ExpandDirection="Right"
  79. Background="Transparent">
  80. <Expander.Header>
  81. <TextBlock RenderTransformOrigin=".5,.5"
  82. Text="Navigation Description">
  83. <TextBlock.LayoutTransform>
  84. <RotateTransform Angle="90" />
  85. </TextBlock.LayoutTransform>
  86. </TextBlock>
  87. </Expander.Header>
  88. <ScrollViewer>
  89. <StackPanel Margin="8,24,16,24"
  90. Orientation="Vertical">
  91. <Image Source="pack://application:,,,/TeamAAS-VP;component/Resources/Images/1描述.png"
  92. Stretch="Uniform"
  93. Width="350"
  94. HorizontalAlignment="Center"
  95. VerticalAlignment="Top" />
  96. <TextBlock Text="{lex:Loc 产品描述}" />
  97. <TextBlock Foreground="Gray"
  98. Text="{lex:Loc 产品描述1}" />
  99. </StackPanel>
  100. </ScrollViewer>
  101. </Expander>
  102. <StackPanel Grid.Column="1"
  103. Orientation="Vertical"
  104. Margin="50,24"
  105. VerticalAlignment="Center"
  106. HorizontalAlignment="Stretch">
  107. <StackPanel Orientation="Horizontal"
  108. Margin="0,20">
  109. <TextBlock Text="{lex:Loc 产品编号,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
  110. VerticalAlignment="Center" />
  111. <mah:NumericUpDown Minimum="0"
  112. Interval="1"
  113. MinWidth="100"
  114. Margin="5,0"
  115. IsEnabled="{Binding IsAllowEdit}"
  116. TextAlignment="Center"
  117. StringFormat="{}{0:N0}"
  118. d:Value="0"
  119. Value="{Binding SelectProduct.NumberCode}" />
  120. </StackPanel>
  121. <TextBlock Text="{lex:Loc 描述}"
  122. FontWeight="Bold" />
  123. <TextBox IsEnabled="{Binding IsAllowEdit}"
  124. MinWidth="280"
  125. MinHeight="200"
  126. VerticalAlignment="Stretch"
  127. materialDesign:HintAssist.Hint="{lex:Loc 请输入产品的描述信息}"
  128. AcceptsReturn="True"
  129. SpellCheck.IsEnabled="True"
  130. materialDesign:HintAssist.HelperText="{lex:Loc 产品描述}"
  131. BorderThickness="1"
  132. TextWrapping="Wrap"
  133. VerticalScrollBarVisibility="Auto"
  134. Text="{Binding SelectProduct.Description}" />
  135. </StackPanel>
  136. </Grid>
  137. <Button Grid.Row="2"
  138. Content="{lex:Loc 下一步}"
  139. IsEnabled="{Binding IsAllowEdit}"
  140. MinWidth="100"
  141. Margin="20"
  142. HorizontalAlignment="Center"
  143. VerticalAlignment="Center"
  144. materialDesign:ButtonAssist.CornerRadius="10"
  145. Style="{StaticResource MaterialDesignRaisedButton}"
  146. Command="{Binding NextCommand}" />
  147. </Grid>
  148. </UserControl>