终端一体化运控平台
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.
 
 
 

123 lines
4.6 KiB

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