Click here to Skip to main content
15,180,027 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
private void OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
   if (!canvas1.IsMouseCaptured)
    {
        startPoint = e.GetPosition(canvas1);
        canvas1.CaptureMouse();
        if (rbCombine.IsChecked == true)
        {
            SetCombineShapes(e);

        }
        else if (rbSelect.IsChecked == true)
        {
            if (canvas1 == e.Source)
                return;
            isDown = true;
            originalElement = (Path)e.Source;
            e.Handled = true;
        }
        else if (rbDelete.IsChecked == true)
        {
            originalElement = (Path)e.Source;
            DeleteShape(originalElement);
        }
    }
}
Posted
Updated 15-Dec-15 13:49pm
Comments
Sergey Alexandrovich Kryukov 15-Dec-15 21:37pm
   
What exactly do you mean by "resize", modification of the shape data or change of rendered size. Those are two different things.
—SA
CursorByte 15-Dec-15 22:38pm
   
modification of the shape of the data or changing the rendered size by either using the 'thumb class' or 'adorner' or if there is any other way, but i don't know how to use it from code not in the xaml after an event
Sergey Alexandrovich Kryukov 15-Dec-15 23:08pm
   
Well, again... You need to explain your ultimate goal. What do you want to achieve?
—SA
CursorByte 16-Dec-15 2:29am
   
Sir Alex, please I would like to resize a shape geometry after drawing it on the canvas. Thus to change the size from a small size to a big one or vice versa using a resizing handle. Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900