终端一体化运控平台
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

118 lines
4.6 KiB

  1. <Window x:Class="BPASmartClient.JXJFoodBigStation.View.ChangeDeviceNameView"
  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:BPASmartClient.JXJFoodBigStation.View"
  7. xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel"
  8. mc:Ignorable="d"
  9. Title="ChangeDeviceNameView" Width="400"
  10. Height="200"
  11. AllowsTransparency="True"
  12. Background="{x:Null}"
  13. Topmost="True"
  14. WindowStartupLocation="CenterScreen"
  15. WindowStyle="None">
  16. <Window.DataContext>
  17. <vm:ChangeDeviceNameViewModel/>
  18. </Window.DataContext>
  19. <Window.Resources>
  20. <ResourceDictionary>
  21. <ResourceDictionary.MergedDictionaries>
  22. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
  23. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
  24. <ResourceDictionary>
  25. <!--#region ListBox样式-->
  26. <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
  27. <Setter Property="OverridesDefaultStyle" Value="True" />
  28. <Setter Property="SnapsToDevicePixels" Value="True" />
  29. <Setter Property="BorderBrush" Value="{x:Null}" />
  30. <Setter Property="Foreground" Value="White" />
  31. <Setter Property="FontSize" Value="20" />
  32. <Setter Property="HorizontalContentAlignment" Value="Center" />
  33. <Setter Property="VerticalContentAlignment" Value="Center" />
  34. <Setter Property="Template">
  35. <Setter.Value>
  36. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  37. <Border x:Name="border" CornerRadius="8">
  38. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  39. </Border>
  40. </ControlTemplate>
  41. </Setter.Value>
  42. </Setter>
  43. </Style>
  44. <!--#endregion-->
  45. </ResourceDictionary>
  46. </ResourceDictionary.MergedDictionaries>
  47. </ResourceDictionary>
  48. </Window.Resources>
  49. <Border
  50. Name="br"
  51. Background="#FF0B2F5F"
  52. BorderThickness="1">
  53. <Grid>
  54. <Grid.RowDefinitions>
  55. <RowDefinition />
  56. <RowDefinition Height="0.5*" />
  57. <RowDefinition />
  58. </Grid.RowDefinitions>
  59. <StackPanel
  60. HorizontalAlignment="Center"
  61. VerticalAlignment="Center"
  62. Orientation="Horizontal">
  63. <TextBlock
  64. Margin="10,0,0,0"
  65. Background="Transparent"
  66. FontSize="20"
  67. Foreground="#FF2AB2E7"
  68. Text="请输入新设备名称:" />
  69. <TextBox
  70. Grid.Column="1"
  71. Width="200"
  72. Height="30"
  73. Margin="0,0,7,0"
  74. FontSize="16"
  75. Text="{Binding DeviceName}" />
  76. </StackPanel>
  77. <TextBlock
  78. Grid.Row="1"
  79. HorizontalAlignment="Center"
  80. VerticalAlignment="Center"
  81. Background="Transparent"
  82. FontSize="16"
  83. Foreground="Red"
  84. Text="{Binding ErrorInfo}" />
  85. <Grid Grid.Row="2">
  86. <Grid.ColumnDefinitions>
  87. <ColumnDefinition />
  88. <ColumnDefinition />
  89. </Grid.ColumnDefinitions>
  90. <Button
  91. Grid.Column="1"
  92. Width="148"
  93. Height="30"
  94. Margin="0,0,7,0"
  95. Command="{Binding ConfirmCommand}"
  96. Content="确认" />
  97. <Button
  98. Name="btClose"
  99. Width="148"
  100. Height="30"
  101. Command="{Binding CancleCommand}"
  102. Content="取消" />
  103. </Grid>
  104. </Grid>
  105. </Border>
  106. </Window>