1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
<Window x:Class="mousemove_sur_canvas.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="{Binding ElementName=alpha, Path=Text}"
Height="412" Width="613">
<Grid>
<Canvas x:Name="drag_surface" Background="CadetBlue"
UIElement.GotFocus="drag_surface_GotFocus"
Mouse.MouseMove="drag_surface_MouseMove">
<Rectangle x:Name="G_Elem_1" Fill="AliceBlue" Height="112" Canvas.Left="163" Canvas.Top="234" Width="177" Focusable="True" />
<Rectangle x:Name="G_Elem_2" Fill="Red" Height="83" Canvas.Left="85" Canvas.Top="56" Width="123" />
<Rectangle x:Name="G_Elem_3" Fill="Green" Height="86" Canvas.Left="370" Canvas.Top="70" Width="125" />
<Button Canvas.Left="10" Canvas.Top="319" Height="45" Name="button1" Width="86" Click="button1_Click" GotFocus="button1_GotFocus">Button</Button>
<Button Canvas.Left="10" Canvas.Top="276" Height="37" Name="button2" Width="90" Click="button2_Click">Button</Button>
</Canvas>
<TextBlock Name="tbTitle">
<TextBlock Text="alpha" x:Name="alpha"/>
<TextBlock Text="betat" x:Name="beta"/>
</TextBlock>
</Grid>
</Window> |
Partager