LightChannelList.xaml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <UserControl x:Class="TeamAAS_VP.Views.Product.LightChannelList"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:prism="http://prismlibrary.com/"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:TeamAAS_VP.Views.Product"
  8. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  9. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  10. xmlns:sys="clr-namespace:System;assembly=mscorlib"
  11. xmlns:enums="clr-namespace:TeamAAS_VP.Enums"
  12. xmlns:valRules="clr-namespace:TeamAAS_VP.Identity"
  13. xmlns:ext="clr-namespace:TeamAAS_VP.Extension"
  14. xmlns:c="clr-namespace:TeamAAS_VP.ValueConverter"
  15. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  16. xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Product"
  17. lex:LocalizeDictionary.DesignCulture="zh-CN"
  18. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  19. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  20. mc:Ignorable="d"
  21. d:Background="White"
  22. d:DataContext="{d:DesignInstance Type=vm:LightChannelListViewModel}"
  23. prism:ViewModelLocator.AutoWireViewModel="True"
  24. FontFamily="{DynamicResource DefaultFont}">
  25. <prism:Dialog.WindowStyle>
  26. <Style TargetType="Window">
  27. <Setter Property="prism:Dialog.WindowStartupLocation"
  28. Value="CenterScreen" />
  29. <!--<Setter Property="WindowChrome.WindowChrome">
  30. <Setter.Value>
  31. <WindowChrome CaptionHeight="0"
  32. ResizeBorderThickness="1" />
  33. </Setter.Value>
  34. </Setter>-->
  35. <Setter Property="WindowStyle"
  36. Value="None" />
  37. <Setter Property="AllowDrop"
  38. Value="True" />
  39. <Setter Property="BorderThickness"
  40. Value="0" />
  41. <Setter Property="ShowInTaskbar"
  42. Value="False" />
  43. <Setter Property="SizeToContent"
  44. Value="WidthAndHeight" />
  45. <Setter Property="WindowState"
  46. Value="Normal" />
  47. <Setter Property="Topmost"
  48. Value="True" />
  49. </Style>
  50. </prism:Dialog.WindowStyle>
  51. <Grid HorizontalAlignment="Center">
  52. <Grid.RowDefinitions>
  53. <RowDefinition Height="*" />
  54. <RowDefinition Height="50" />
  55. </Grid.RowDefinitions>
  56. <!--参数详情-->
  57. <StackPanel>
  58. <TextBlock Text="{lex:Loc 请选择要启用的光源通道}"
  59. FontWeight="Bold"
  60. Margin="0,0,0,8" />
  61. <ListBox x:Name="AvailableListBox"
  62. ItemsSource="{Binding AllLightChannels}"
  63. SelectionMode="Extended"
  64. MinHeight="200"
  65. MaxHeight="500">
  66. <ListBox.ItemTemplate>
  67. <DataTemplate>
  68. <StackPanel Orientation="Horizontal">
  69. <TextBlock Text="{Binding GlobalIndex}"
  70. Margin="6,0" />
  71. <TextBlock Text="{Binding Name}" />
  72. <TextBlock Text="{Binding Description}"
  73. Margin="6,0" />
  74. <CheckBox IsChecked="{Binding IsSelected}" />
  75. </StackPanel>
  76. </DataTemplate>
  77. </ListBox.ItemTemplate>
  78. </ListBox>
  79. </StackPanel>
  80. <StackPanel Grid.Row="1"
  81. Orientation="Horizontal"
  82. HorizontalAlignment="Right">
  83. <Button Height="30"
  84. materialDesign:ButtonAssist.CornerRadius="10"
  85. ToolTip="{lex:Loc 确定}"
  86. Command="{Binding ConfirmCommand}">
  87. <TextBlock Text="{lex:Loc 确定}" />
  88. </Button>
  89. <Button Height="30"
  90. Margin="20,0"
  91. materialDesign:ButtonAssist.CornerRadius="10"
  92. Style="{StaticResource MaterialDesignRaisedButton}"
  93. ToolTip="{lex:Loc 取消}"
  94. Command="{Binding CancelCommand}">
  95. <TextBlock Text="{lex:Loc 取消}" />
  96. </Button>
  97. </StackPanel>
  98. </Grid>
  99. </UserControl>