LightManual.xaml 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <UserControl x:Class="TeamAAS_VP.Views.DebugMod.LightManual"
  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:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.DebugMod"
  8. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  9. xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
  10. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  11. xmlns:sys="clr-namespace:System;assembly=mscorlib"
  12. xmlns:uControl="clr-namespace:TeamAAS_VP.Controls"
  13. xmlns:convert="clr-namespace:TeamAAS_VP.ValueConverter"
  14. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  15. lex:LocalizeDictionary.DesignCulture="zh-CN"
  16. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  17. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  18. prism:ViewModelLocator.AutoWireViewModel="True"
  19. mc:Ignorable="d"
  20. d:Background="White"
  21. d:DataContext="{d:DesignInstance Type=vm:LightManualViewModel}"
  22. FontFamily="{DynamicResource DefaultFont}">
  23. <b:Interaction.Triggers>
  24. <b:EventTrigger EventName="Loaded">
  25. <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
  26. </b:EventTrigger>
  27. </b:Interaction.Triggers>
  28. <Grid VerticalAlignment="Top" IsEnabled="{Binding IsAllowEdit}">
  29. <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
  30. <ItemsControl ItemsSource="{Binding Channels}">
  31. <ItemsControl.ItemTemplate>
  32. <DataTemplate>
  33. <Border BorderBrush="Gray" BorderThickness="1" Margin="6" Padding="8" CornerRadius="6">
  34. <StackPanel Orientation="Vertical">
  35. <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
  36. <TextBlock Text="通道:" FontWeight="Bold" Margin="0,0,6,0" />
  37. <TextBlock Text="{Binding GlobalId}" Width="40" />
  38. <TextBlock Text="名称:" FontWeight="Bold" Margin="10,0,6,0" />
  39. <TextBlock Text="{Binding Name}" />
  40. </StackPanel>
  41. <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,8,0,0">
  42. <TextBlock Text="亮度:" VerticalAlignment="Center" Margin="0,0,6,0" />
  43. <Slider Width="280" Minimum="0" Maximum="255" Value="{Binding PendingBrightness,Mode=TwoWay}" SmallChange="1" LargeChange="10" />
  44. <TextBlock Text="{Binding PendingBrightness}" Width="40" Margin="6,0,0,0" VerticalAlignment="Center" />
  45. </StackPanel>
  46. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,8,0,0">
  47. <Button Content="打开" Command="{Binding TurnOnCommand}" Margin="0,0,8,0" />
  48. <Button Content="关闭" Command="{Binding TurnOffCommand}" Margin="0,0,8,0" />
  49. <Button Content="保存" Command="{Binding SaveCommand}" />
  50. </StackPanel>
  51. </StackPanel>
  52. </Border>
  53. </DataTemplate>
  54. </ItemsControl.ItemTemplate>
  55. <ItemsControl.ItemsPanel>
  56. <ItemsPanelTemplate>
  57. <StackPanel />
  58. </ItemsPanelTemplate>
  59. </ItemsControl.ItemsPanel>
  60. </ItemsControl>
  61. </ScrollViewer>
  62. </Grid>
  63. </UserControl>