added some practice examples
This commit is contained in:
51
20241107/WpfApp1/MainWindow.xaml
Normal file
51
20241107/WpfApp1/MainWindow.xaml
Normal file
@@ -0,0 +1,51 @@
|
||||
<Window x:Class="WpfApp1.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:WpfApp1"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="25"></RowDefinition>
|
||||
<RowDefinition Height="33*"></RowDefinition>
|
||||
<RowDefinition Height="33*"></RowDefinition>
|
||||
<RowDefinition Height="33*"></RowDefinition>
|
||||
<RowDefinition Height="50"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="1" FontSize="20" VerticalAlignment="Center">
|
||||
<TextBlock.Text>
|
||||
Red:
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
<Slider Grid.Row="1" Width="250" HorizontalAlignment="Center" VerticalAlignment="Center" Name="redSlider" ValueChanged="redSlider_ValueChanged" Minimum="0" Maximum="255"></Slider>
|
||||
|
||||
|
||||
<TextBlock Grid.Row="2" FontSize="20" VerticalAlignment="Center">
|
||||
<TextBlock.Text>
|
||||
Green:
|
||||
</TextBlock.Text>
|
||||
|
||||
</TextBlock>
|
||||
<Slider Grid.Row="2" Width="250" HorizontalAlignment="Center" VerticalAlignment="Center" Name="greenSlider" ValueChanged="greenSlider_ValueChanged" Minimum="0" Maximum="255"></Slider>
|
||||
|
||||
<TextBlock Grid.Row="3" FontSize="20" VerticalAlignment="Center">
|
||||
<TextBlock.Text>
|
||||
Blue:
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
<Slider Grid.Row="3" Width="250" HorizontalAlignment="Center" VerticalAlignment="Center" Name="blueSlider" ValueChanged="blueSlider_ValueChanged" Minimum="0" Maximum="255"></Slider>
|
||||
|
||||
<Rectangle Name="myrectangle" Grid.Row="4">
|
||||
<Rectangle.Fill>
|
||||
<SolidColorBrush>
|
||||
<SolidColorBrush.Color>
|
||||
<Color></Color>
|
||||
</SolidColorBrush.Color>
|
||||
</SolidColorBrush>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user