PageRenderTime 21ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/Visual Studio 2008/VBSL3WriteableBitmap/FillColor.xaml

#
XAML | 32 lines | 32 code | 0 blank | 0 comment | 0 complexity | bb4b987d5eb76e548d050dffa7431cd3 MD5 | raw file
 1<UserControl
 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" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="VBSL3WriteableBitmap.FillColor" 
 5    Loaded="UserControl_Loaded" mc:Ignorable="d" d:DesignWidth="374" d:DesignHeight="231">
 6	<StackPanel x:Name="LayoutRoot">
 7		<TextBlock Text="Use the sliders to select a desired color, and than click on the heart to fill it with the selected color." TextWrapping="Wrap"/>
 8		<Grid>
 9			<TextBlock Text="Alpha: " TextWrapping="Wrap" d:LayoutOverrides="Height"/>
10			<Slider x:Name="alphaSlider" Minimum="0" Maximum="255" Value="255" Margin="40,0,5,0" d:LayoutOverrides="Height" ValueChanged="ColorSliderValueChanged"/>
11		</Grid>
12		<Grid>
13			<TextBlock Text="Red: " TextWrapping="Wrap" d:LayoutOverrides="Height"/>
14			<Slider x:Name="redSlider" Minimum="0" Maximum="255" Value="255" Margin="40,0,5,0" d:LayoutOverrides="Height" ValueChanged="ColorSliderValueChanged"/>
15		</Grid>
16		<Grid>
17			<TextBlock Text="Green: " TextWrapping="Wrap" d:LayoutOverrides="Height"/>
18			<Slider x:Name="greenSlider" Minimum="0" Maximum="255" Value="0" Margin="40,0,5,0" d:LayoutOverrides="Height" ValueChanged="ColorSliderValueChanged"/>
19		</Grid>
20		<Grid>
21			<TextBlock Text="Blue: " TextWrapping="Wrap" d:LayoutOverrides="Height"/>
22			<Slider x:Name="blueSlider" Minimum="0" Maximum="255" Value="0" Margin="40,0,5,0" d:LayoutOverrides="Height" ValueChanged="ColorSliderValueChanged"/>
23		</Grid>
24		<Grid>
25			<TextBlock Margin="0,0,1,0" Text="Fill color:" TextWrapping="Wrap" d:LayoutOverrides="Width, Height" HorizontalAlignment="Left" VerticalAlignment="Center"/>
26			<Rectangle x:Name="fillColorRectangle" Fill="Red" Height="30" Width="30" HorizontalAlignment="Left" Margin="58,0,0,0"/>
27		</Grid>
28		<Canvas Background="White">
29			<Image x:Name="img" MouseLeftButtonDown="img_MouseLeftButtonDown"/>
30		</Canvas>
31	</StackPanel>
32</UserControl>