Click here to Skip to main content
15,889,096 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
http://miteshsureja.blogspot.com/2016/08/adorners-in-wpf.html?m=1#:~:text=See%20below%20example%20which%20uses,select%2Fresize%20UIElement%20on%20canvas.&text=%3CButton%20Height%3D%2250%22,Content%3D%22Click%20Me!%22&text=As%20you%20can%20see%20in,corners%20will%20appear%20to%20control.    This is the article from where i learn to draw adorner layer on the top of any control or shape. Here i want to do when i click on canvas it create new shape with adorner... which is running perfectly... what is want when i click on canvas and drag through mouse it resize the control.. all this happen in single mouse down and up cycle right now its happening but requires two mouse click.. one for creating the control other to resize it. Is there any way to call dragdelta of bottomright automatically after creating the control


What I have tried:

http://miteshsureja.blogspot.com/2016/08/adorners-in-wpf.html?m=1#:~:text=See%20below%20example%20which%20uses,select%2Fresize%20UIElement%20on%20canvas.&text=%3CButton%20Height%3D%2250%22,Content%3D%22Click%20Me!%22&text=As%20you%20can%20see%20in,corners%20will%20appear%20to%20control.
Posted
Updated 13-May-21 12:35pm
Comments
[no name] 13-May-21 12:52pm    
You're going to have to put a bit more effort into the "presentation" of your question if you expect much traction. And links aren't that popular either.
himani_jha 14-May-21 0:28am    
On one mouse down i am creating a shape/control of minimum size, and adding adorner layer to it. And on other mouse down adorners thumb are visible and i am able to resize it... i want the whole story in single mouse down .. is it possible???

1 solution

I just read your header, but that does not match the discription you give in your question. To generate movement for a WPF control similar to a mouse drag and move action, use a storyboard and invoke it from code behind.
 
Share this answer
 
Comments
himani_jha 14-May-21 0:27am    
On one mouse down i am creating a shape/control of minimum size, and adding adorner layer to it. And on other mouse down adorners thumb are visible and i am able to resize it... i want the whole story in single mouse down .. is it possible???

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