终端一体化运控平台
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ChangeDeviceNameView.xaml 4.6 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <Window
  2. x:Class="BPASmartClient.JXJFoodSmallStation.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.JXJFoodSmallStation.View"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.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 ConfirmCommand}"
  98. Content="确认" />
  99. <Button
  100. Name="btClose"
  101. Width="148"
  102. Height="30"
  103. Command="{Binding CancleCommand}"
  104. Content="取消" />
  105. </Grid>
  106. </Grid>
  107. </Border>
  108. </Window>