终端一体化运控平台
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

108 rader
6.1 KiB

  1. <Window x:Class="BPASmart.RecipeManagement.MainWindow"
  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"
  7. xmlns:view="clr-namespace:BPASmart.RecipeManagement.View"
  8. xmlns:vm="clr-namespace:BPASmart.RecipeManagement.ViewModel"
  9. mc:Ignorable="d"
  10. Title="MainWindow" Height="900" Width="1400" WindowStyle="None" WindowStartupLocation="CenterScreen">
  11. <Window.DataContext>
  12. <vm:MainWindowViewModel/>
  13. </Window.DataContext>
  14. <Window.Resources>
  15. <Style x:Key="RadioNavigation" TargetType="RadioButton">
  16. <Setter Property="Margin" Value="-4,10"/>
  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. <Grid Background="{TemplateBinding Background}" Margin="{TemplateBinding Margin}">
  25. <Border x:Name="_borderOver" Background="Transparent" Width="200" BorderBrush="Transparent" BorderThickness="0,1">
  26. <TextBlock Foreground="White" Text="{TemplateBinding Content}" FontSize="24" Background="Transparent"
  27. VerticalAlignment="Center" HorizontalAlignment="Center"/>
  28. </Border>
  29. </Grid>
  30. <ControlTemplate.Triggers>
  31. <Trigger Property="IsMouseOver" Value="True">
  32. <Setter Property="Background" TargetName="_borderOver" Value="#1971B6"/>
  33. </Trigger>
  34. <Trigger Property="IsChecked" Value="True">
  35. <Setter Property="BorderBrush" TargetName="_borderOver" Value="White"/>
  36. <Setter Property="BorderThickness" TargetName="_borderOver" Value="0,1"/>
  37. </Trigger>
  38. </ControlTemplate.Triggers>
  39. </ControlTemplate>
  40. </Setter.Value>
  41. </Setter>
  42. </Style>
  43. <Style x:Key="ButtonNavigation" TargetType="Button">
  44. <Setter Property="Height" Value="40"/>
  45. <Setter Property="Foreground" Value="White"/>
  46. <Setter Property="FontSize" Value="20"/>
  47. <Setter Property="VerticalAlignment" Value="Center"/>
  48. <Setter Property="Background" Value="Transparent"/>
  49. <Setter Property="Template">
  50. <Setter.Value>
  51. <ControlTemplate TargetType="Button">
  52. <Grid Background="{TemplateBinding Background}" Margin="{TemplateBinding Margin}">
  53. <Border x:Name="_borderOver" Background="Transparent" Width="200" BorderBrush="Transparent" BorderThickness="0,1">
  54. <TextBlock Foreground="White" Text="{TemplateBinding Content}" FontSize="24" Background="Transparent"
  55. VerticalAlignment="Center" HorizontalAlignment="Center"/>
  56. </Border>
  57. </Grid>
  58. <ControlTemplate.Triggers>
  59. <Trigger Property="IsMouseOver" Value="True">
  60. <Setter Property="Background" TargetName="_borderOver" Value="#1971B6"/>
  61. </Trigger>
  62. </ControlTemplate.Triggers>
  63. </ControlTemplate>
  64. </Setter.Value>
  65. </Setter>
  66. </Style>
  67. </Window.Resources>
  68. <Border Background="Transparent">
  69. <Grid>
  70. <Grid.ColumnDefinitions>
  71. <ColumnDefinition Width="200"/>
  72. <ColumnDefinition Width="*"/>
  73. <ColumnDefinition Width="2"/>
  74. </Grid.ColumnDefinitions>
  75. <Grid.RowDefinitions>
  76. <RowDefinition Height="10"/>
  77. <RowDefinition Height="*"/>
  78. <RowDefinition Height="60"/>
  79. </Grid.RowDefinitions>
  80. <StackPanel x:Name="mylistview" Background="#2196F3" Grid.RowSpan="2"
  81. ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
  82. MouseDown="mylistview_MouseDown" >
  83. <RadioButton Content="订单管理" Style="{DynamicResource RadioNavigation}" IsChecked="True"
  84. Click="NavButton_Click" Tag="OrderManager"/>
  85. <RadioButton Content="配方管理" Style="{DynamicResource RadioNavigation}"
  86. Click="NavButton_Click" Tag="RecipeManager"/>
  87. <RadioButton Content="原料管理" Style="{DynamicResource RadioNavigation}"
  88. Click="NavButton_Click" Tag="MaterialManager"/>
  89. <RadioButton Content="工艺参数" Style="{DynamicResource RadioNavigation}"
  90. Click="NavButton_Click" Tag="TechnologySetting"/>
  91. <RadioButton Content="权限分配" Style="{DynamicResource RadioNavigation}"
  92. Click="NavButton_Click" Tag="PowerManager"/>
  93. </StackPanel>
  94. <Border Background="#2196F3" Grid.Row="2">
  95. <Button Content="退出"
  96. Style="{DynamicResource ButtonNavigation}"
  97. Click="Button_Click">
  98. </Button>
  99. </Border>
  100. <ContentControl x:Name="contentRegion" Grid.Column="1" Grid.Row="1" >
  101. <view:PowerManager/>
  102. </ContentControl>
  103. </Grid>
  104. </Border>
  105. </Window>