终端一体化运控平台
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

177 řádky
9.7 KiB

  1. <UserControl x:Class="BPASmart.RecipeManagement.MainControl"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmart.RecipeManagement"
  7. xmlns:view="clr-namespace:BPASmart.RecipeManagement.View"
  8. xmlns:vm="clr-namespace:BPASmart.RecipeManagement.ViewModel"
  9. mc:Ignorable="d"
  10. d:DesignHeight="800" d:DesignWidth="1400">
  11. <UserControl.DataContext>
  12. <vm:MainControl/>
  13. </UserControl.DataContext>
  14. <UserControl.Resources>
  15. <Style x:Key="RadioNavigation" TargetType="RadioButton">
  16. <Setter Property="Margin" Value="-4,0"/>
  17. <Setter Property="Background" Value="Transparent"/>
  18. <Setter Property="GroupName" Value="Navigation"/>
  19. <Setter Property="VerticalAlignment" Value="Center"/>
  20. <Setter Property="HorizontalAlignment" Value="Center"/>
  21. <Setter Property="Template">
  22. <Setter.Value>
  23. <ControlTemplate TargetType="RadioButton">
  24. <Border x:Name="_borderOver" Background="Transparent" Width="200" BorderBrush="Transparent" BorderThickness="0,1">
  25. <Grid Background="{TemplateBinding Background}" Margin="{TemplateBinding Margin}">
  26. <TextBlock Foreground="White" Text="{TemplateBinding Content}" FontSize="24" Background="Transparent"
  27. VerticalAlignment="Center" HorizontalAlignment="Center"/>
  28. </Grid>
  29. </Border>
  30. <ControlTemplate.Triggers>
  31. <Trigger Property="IsMouseOver" Value="True">
  32. <Setter Property="BorderBrush" TargetName="_borderOver" Value="#1971B6"/>
  33. <Setter Property="Background" TargetName="_borderOver">
  34. <Setter.Value>
  35. <LinearGradientBrush StartPoint="0,1" EndPoint="1,1">
  36. <GradientStop Color="#104E8B" Offset="0"/>
  37. <GradientStop Color="#1874CD" Offset="0.4"/>
  38. <GradientStop Color="#1874CD" Offset="0.6"/>
  39. <GradientStop Color="#27408B" Offset="1"/>
  40. </LinearGradientBrush>
  41. </Setter.Value>
  42. </Setter>
  43. </Trigger>
  44. <Trigger Property="IsChecked" Value="True">
  45. <Setter Property="Background" TargetName="_borderOver" >
  46. <Setter.Value>
  47. <ImageBrush ImageSource="../Image/leftImage.png"/>
  48. </Setter.Value>
  49. </Setter>
  50. </Trigger>
  51. </ControlTemplate.Triggers>
  52. </ControlTemplate>
  53. </Setter.Value>
  54. </Setter>
  55. </Style>
  56. <ControlTemplate x:Key="butonTempalte" TargetType="RadioButton">
  57. <Border x:Name="_borderOver" Background="Transparent" Width="200" Height="60" BorderBrush="Transparent" BorderThickness="0,1">
  58. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
  59. </Border>
  60. <ControlTemplate.Triggers>
  61. <Trigger Property="IsMouseOver" Value="True">
  62. <Setter Property="BorderBrush" TargetName="_borderOver" Value="#1971B6"/>
  63. <Setter Property="Background" TargetName="_borderOver">
  64. <Setter.Value>
  65. <LinearGradientBrush StartPoint="0,1" EndPoint="1,1">
  66. <GradientStop Color="#104E8B" Offset="0"/>
  67. <GradientStop Color="#1874CD" Offset="0.4"/>
  68. <GradientStop Color="#1874CD" Offset="0.6"/>
  69. <GradientStop Color="#27408B" Offset="1"/>
  70. </LinearGradientBrush>
  71. </Setter.Value>
  72. </Setter>
  73. </Trigger>
  74. <Trigger Property="IsChecked" Value="True">
  75. <Setter Property="Background" TargetName="_borderOver" >
  76. <Setter.Value>
  77. <ImageBrush ImageSource="../Image/leftImage.png"/>
  78. </Setter.Value>
  79. </Setter>
  80. </Trigger>
  81. </ControlTemplate.Triggers>
  82. </ControlTemplate>
  83. <Style x:Key="fonticon" TargetType="{x:Type TextBlock}">
  84. <Setter Property="FontFamily" Value="pack://application:,,,/Font/#iconfont"/>
  85. <Setter Property="FontSize" Value="24"/>
  86. <Setter Property="Foreground" Value="White"/>
  87. <Setter Property="HorizontalAlignment" Value="Center"/>
  88. <Setter Property="VerticalAlignment" Value="Center"/>
  89. <Setter Property="Margin" Value="0,0,20,0"/>
  90. </Style>
  91. </UserControl.Resources>
  92. <Grid>
  93. <Grid.ColumnDefinitions>
  94. <ColumnDefinition Width="*"/>
  95. <ColumnDefinition Width="6*"/>
  96. </Grid.ColumnDefinitions>
  97. <Border Grid.Row="1" Grid.RowSpan="2" BorderBrush="#1E90FF" BorderThickness="0,0,2,0">
  98. <Border.Background>
  99. <LinearGradientBrush StartPoint="0,1" EndPoint="1,1">
  100. <GradientStop Color="#01003B" Offset="0.2"/>
  101. <GradientStop Color="#010050" Offset="1"/>
  102. </LinearGradientBrush>
  103. </Border.Background>
  104. </Border>
  105. <StackPanel x:Name="mylistview" Background="Transparent" Grid.RowSpan="1" Grid.Row="1"
  106. ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
  107. MouseLeftButtonDown="mylistview_MouseDown" >
  108. <RadioButton Style="{DynamicResource RadioNavigation}" IsChecked="True" Template="{DynamicResource butonTempalte }"
  109. Click="NavButton_Click" Tag="OrderManager">
  110. <Grid Background="Transparent" >
  111. <Grid.ColumnDefinitions>
  112. <ColumnDefinition Width="auto"/>
  113. <ColumnDefinition Width="*"/>
  114. </Grid.ColumnDefinitions>
  115. <TextBlock Text="&#xe737;" Style="{DynamicResource fonticon}"/>
  116. <TextBlock Grid.Column="1" Foreground="White" Text="订单管理" FontSize="24" Background="Transparent"
  117. VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>
  118. </Grid>
  119. </RadioButton>
  120. <RadioButton Style="{DynamicResource RadioNavigation}" Template="{DynamicResource butonTempalte }"
  121. Click="NavButton_Click" Tag="RecipeManager">
  122. <Grid Background="Transparent" >
  123. <Grid.ColumnDefinitions>
  124. <ColumnDefinition Width="auto"/>
  125. <ColumnDefinition Width="*"/>
  126. </Grid.ColumnDefinitions>
  127. <TextBlock Text="&#xe683;" Style="{DynamicResource fonticon}"/>
  128. <TextBlock Grid.Column="1" Foreground="White" Text="配方管理" FontSize="24" Background="Transparent"
  129. VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>
  130. </Grid>
  131. </RadioButton>
  132. <RadioButton Style="{DynamicResource RadioNavigation}" Template="{DynamicResource butonTempalte }"
  133. Click="NavButton_Click" Tag="MaterialManager">
  134. <Grid Background="Transparent" >
  135. <Grid.ColumnDefinitions>
  136. <ColumnDefinition Width="auto"/>
  137. <ColumnDefinition Width="*"/>
  138. </Grid.ColumnDefinitions>
  139. <TextBlock Text="&#xe63b;" Style="{DynamicResource fonticon}"/>
  140. <TextBlock Grid.Column="1" Foreground="White" Text="原料管理" FontSize="24" Background="Transparent"
  141. VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>
  142. </Grid>
  143. </RadioButton>
  144. <RadioButton Style="{DynamicResource RadioNavigation}" Template="{DynamicResource butonTempalte }"
  145. Click="NavButton_Click" Tag="PowerManager">
  146. <Grid Background="Transparent" >
  147. <Grid.ColumnDefinitions>
  148. <ColumnDefinition Width="auto"/>
  149. <ColumnDefinition Width="*"/>
  150. </Grid.ColumnDefinitions>
  151. <TextBlock Text="&#xe60c;" Style="{DynamicResource fonticon}"/>
  152. <TextBlock Grid.Column="1" Foreground="White" Text="权限分配" FontSize="24" Background="Transparent"
  153. VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="楷体"/>
  154. </Grid>
  155. </RadioButton>
  156. </StackPanel>
  157. <ContentControl x:Name="contentRegion" Grid.Column="1" Grid.Row="1" Background="#01003B" BorderBrush="Transparent">
  158. <view:OrderManager/>
  159. </ContentControl>
  160. </Grid>
  161. </UserControl>