终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

136 regels
6.2 KiB

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