|
Hi,
I'm trying to produce a simple designer in Xaml, for a test app I've produced the following Xaml:
< Window x:Class="xamlWindowsApp.frmDesigner" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="xamlWindowsApp" Height="450" Width="582" xmlns:my="clr-namespace:System;assembly=mscorlib">
< DockPanel Margin="1,1,2,2" MinHeight="50" MinWidth="50" Name="dockPanel1" LastChildFill ="True">
<Canvas MouseLeftButtonUp ="OnLeftButtonUp">
< Label MouseLeftButtonDown ="OnLeftButtonDown" MouseLeftButtonUp ="OnLeftButtonUp" MouseMove ="OnMouseMove" HorizontalAlignment="Right" Name="label1" Width="60" BorderBrush="#FFC0C0C0" BorderThickness="3,3,3,3" Height="30" VerticalAlignment="Bottom" Canvas.Left="40" Canvas.Top="10">Movable</Label>
</ Canvas>
</ DockPanel>
</ Window>
I have two question:
1. How do I get the location of the mouse on the canvas?
2. How do I change the Labels canvas properties so that I can get it to track the mouse within the canvas.
Thanks in advance for any help
AndyH
|