MainWindow.xaml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <Window x:Class="DataLogistics.MainWindow"
  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:DataLogistics"
  7. mc:Ignorable="d"
  8. Title="MainWindow" Height="450" Width="300">
  9. <Window.DataContext><local:MainWindowViewModel x:Name="ViewModel"/></Window.DataContext>
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="2*"/>
  13. <RowDefinition Height="Auto"/>
  14. <RowDefinition Height="2*"/>
  15. <RowDefinition Height="Auto"/>
  16. <RowDefinition Height="2*"/>
  17. <RowDefinition Height="*"/>
  18. </Grid.RowDefinitions>
  19. <Grid.ColumnDefinitions>
  20. <ColumnDefinition Width="*"/>
  21. <ColumnDefinition Width="*"/>
  22. <ColumnDefinition Width="*"/>
  23. </Grid.ColumnDefinitions>
  24. <Button Command="{Binding OnOffCommand}" Content="Switch" Grid.ColumnSpan="3" Margin="10"/>
  25. <TextBox Text="Value" Grid.Row="1" Grid.Column="1" BorderThickness="0"/>
  26. <Slider Grid.Row="2" Minimum="0" Maximum="255" Margin="20" Value="{Binding DimmerValue}" Grid.ColumnSpan="3"/>
  27. <TextBox Text="Red" Grid.Row="3" Grid.Column="0" Margin="2" BorderThickness="0"/>
  28. <TextBox Text="Green" Grid.Row="3" Grid.Column="1" Margin="2" BorderThickness="0"/>
  29. <TextBox Text="Blue" Grid.Row="3" Grid.Column="2" Margin="2" BorderThickness="0"/>
  30. <Slider Grid.Row="4" Grid.Column="0" Value="{Binding RedValue, Mode=TwoWay}" Minimum="0" Maximum="255"/>
  31. <Slider Grid.Row="4" Grid.Column="1" Value="{Binding GreenValue, Mode=TwoWay}" Minimum="0" Maximum="255"/>
  32. <Slider Grid.Row="4" Grid.Column="2" Value="{Binding BlueValue, Mode=TwoWay}" Minimum="0" Maximum="255"/>
  33. <TextBox Text="HexValue:
  34. " Grid.Row="5" Grid.Column="0" TextAlignment="Right" BorderThickness="0"/>
  35. <TextBox Text="{Binding HexValue}" Grid.Row="5" Grid.Column="1" BorderThickness="0"/>
  36. <TextBox Grid.Row="5" Grid.Column="2" TextAlignment="Right" Background="{Binding HexValue}" BorderThickness="0"/>
  37. </Grid>
  38. </Window>