终端一体化运控平台
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

134 行
6.3 KiB

  1. <UserControl x:Class="BPASmartClient.JXJFoodBigStation.View.DeviceManageView"
  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:BPASmartClient.JXJFoodBigStation.View"
  7. xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel"
  8. mc:Ignorable="d"
  9. d:DesignHeight="450" d:DesignWidth="800">
  10. <UserControl.DataContext>
  11. <vm:DeviceManageViewModel/>
  12. </UserControl.DataContext>
  13. <Grid Margin="-5,0,5,0">
  14. <Grid>
  15. <ListView
  16. Grid.Column="1"
  17. Margin="10"
  18. Background="Transparent"
  19. BorderBrush="#00BEFA"
  20. BorderThickness="0"
  21. ItemsSource="{Binding Devices}"
  22. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  23. <ListView.ItemsPanel>
  24. <ItemsPanelTemplate>
  25. <UniformGrid
  26. HorizontalAlignment="Left"
  27. VerticalAlignment="Top"
  28. Columns="8" />
  29. </ItemsPanelTemplate>
  30. </ListView.ItemsPanel>
  31. <ListView.ItemTemplate>
  32. <DataTemplate>
  33. <Border
  34. Name="ShadowElement"
  35. Width="180"
  36. Height="150"
  37. Margin="10"
  38. VerticalAlignment="Top"
  39. BorderBrush="#00BEFA"
  40. BorderThickness="0"
  41. ClipToBounds="True"
  42. CornerRadius="0">
  43. <Border.Background>
  44. <ImageBrush Stretch="Fill" ImageSource="/BPASmartClient.CustomResource;component/Image/蓝色背景.png" />
  45. </Border.Background>
  46. <Grid Margin="20 0">
  47. <!--<Grid.RowDefinitions>
  48. <RowDefinition />
  49. <RowDefinition />
  50. </Grid.RowDefinitions>
  51. <Grid.ColumnDefinitions>
  52. <ColumnDefinition />
  53. <ColumnDefinition />
  54. </Grid.ColumnDefinitions>-->
  55. <Grid.RowDefinitions>
  56. <RowDefinition />
  57. <RowDefinition />
  58. <RowDefinition />
  59. </Grid.RowDefinitions>
  60. <TextBlock
  61. Grid.Row="0"
  62. Grid.ColumnSpan="2"
  63. Margin="0,10,0,0"
  64. VerticalAlignment="Center"
  65. FontSize="20"
  66. Foreground="#00BEFA"
  67. Text="{Binding DeviceName}" />
  68. <StackPanel
  69. Grid.Row="1"
  70. VerticalAlignment="Center"
  71. Orientation="Horizontal">
  72. <TextBlock
  73. Grid.Row="1"
  74. FontSize="14"
  75. Foreground="#aa00BEFA"
  76. Text="设备IP:" />
  77. <TextBlock
  78. Grid.Row="1"
  79. FontSize="14"
  80. Foreground="#aa00BEFA"
  81. Text="{Binding IpAddress}" />
  82. </StackPanel>
  83. <Button
  84. Grid.Row="2"
  85. Width="130"
  86. Height="30"
  87. Margin="0,0,0,0"
  88. VerticalAlignment="Top"
  89. Command="{Binding DataContext.ChangeNameCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
  90. CommandParameter="{Binding IpAddress}"
  91. Content="修改原料名称"
  92. FontSize="16"
  93. IsEnabled="{Binding IsEnable}"
  94. Style="{StaticResource ImageButtonStyle}" />
  95. <!--<Button
  96. Grid.Row="1"
  97. Grid.Column="0"
  98. Grid.ColumnSpan="2"
  99. Foreground="#00BEFA"
  100. Width="130"
  101. Height="30"
  102. Margin="0,0,0,10"
  103. HorizontalAlignment="Left"
  104. VerticalAlignment="Bottom"
  105. Command="{Binding DataContext.ChangeNameCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
  106. CommandParameter="{Binding IpAddress}"
  107. Content="修改原料名称"
  108. IsEnabled="{Binding IsEnable}">
  109. <Button.Background>
  110. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/系统名称.png" />
  111. </Button.Background>
  112. </Button>-->
  113. </Grid>
  114. </Border>
  115. </DataTemplate>
  116. </ListView.ItemTemplate>
  117. </ListView>
  118. </Grid>
  119. </Grid>
  120. </UserControl>