질문을 해결하는 데 도움이되는 사람이 있습니까? 그림을 필드로 어떻게 나눌 수 있습니까? 마우스를 클릭하면 특정 이벤트가 수행됩니다.SilverLight를 사용하여 그림을 필드로 나누는 방법
private void LayoutRoot_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
//if (!isDragging)
{
//creating of my user control element
NodePicture node = new NodePicture();
node.Width = 100;
node.Height = 100;
//use cursor position as the center of the figure
Point point = e.GetPosition(this);
node.SetValue(Canvas.TopProperty, point.Y - node.Height/2);
node.SetValue(Canvas.LeftProperty, point.X - node.Width/2);
node.MouseLeftButtonDown += controlReletionshipsLine;
LayoutRoot.Children.Add(node);
}
}
private void controlReletionshipsLine(object sender, MouseButtonEventArgs e)
{
//creating parant element of node
ParentNode parentNode = new ParentNode();
//creating connected element of the node
ConnectedNode connectedNode = new ConnectedNode();
//creating node element
NodePicture node = (NodePicture)sender;
//getting the relative position of the element
Point point = e.GetPosition(this);
자세한 내용은 필수 항목입니다. 그림으로 무엇을 의미합니까 ?? –
예를 들어 원으로 나눌 필요가 있습니다. @ Myles J – revolutionkpi
html지도와 비슷합니까? – baalazamon