终端一体化运控平台
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

DeviceManageView.xaml 6.3 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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>