TransformInteraction

Oct 23, 2008 at 2:18 PM
Hi,

I am really impressed with the transforminteraction control.  One quick question, Should clicking the red button allow you to use the control you have wrapped with the Transform Interaction?

For example, if I want to put a Rich Text Box that I can use and edit inside the TransformInteraction.

Thanks

Jay
Coordinator
Oct 24, 2008 at 7:13 AM
Edited Oct 24, 2008 at 7:15 AM
Hi,
The red button is just an area that will raise a click event. You could listen to that event and do whatever you want. Or another solution to your problem would be to set a different style (Template) of the transform interaction control. Right now it is composed of a set of panels (one for scaling, one for translation, one for rotation and one for the red "button"), where each panel listens to mouse events. In the published version these panels covers the underlying control, but that doesn't have to be the case. You could set the panels so that they are just covering a part of the control. E.g. open the control in Expression Blend, right click the TransformInteractionControl and select Control Template->Edit a copy. Then set some background colors on the panels and you will see how they span the control. Then change the size of the panels and you will be able to interact with your underlying text box. I hope this helps!
//Anders
Oct 29, 2008 at 9:25 AM
Thanks for the reply Anders.

I am not having much success.  Do you have a quick sample to show with the control allowing the child allowing interaction.  For example a rich text box, or a textbox?

Many thanks

Jay
Coordinator
Oct 30, 2008 at 9:32 AM
Hi Jay,

I have now updated a sample in the source code with a custom style for the interaction control and an underlying RichTextBox. Under Source Code, browse to DotwaySampleApplication/Samples and look at the code in TransfromInteractionSample.xaml and TransformInteractionSample.xaml.cs. You can copy/paste that code to your own project. In the added example I have created a cutom style for one of the samples and in that style I have moved the translation controls to a border around the RichTextBox.
The panels used for interactions is not very pretty, but they are there to show the developer how this control works. Change the colors or set their background to Transparent (and indicate the rotations, translation etc. with Cursor="...") to make the control look better. I hope this will help you solve your problem.

//Anders
www.dotway.se
Oct 30, 2008 at 11:22 AM
Hej Anders.

Tak!

Fantastic, works perfectly.  Thanks for the update and the sample, it works really well.

Thanks again for doing this, and for an excellent toolkit.

Jay

Mar 12, 2010 at 11:42 AM

Hi,

The article is absolutely helpful for me. My only concerned is that i wanted to know the coordinates and location of a line control if i resize it.

Thanks in Advance

Hari