In-place edit control affected from zoom

Hi,
I’ve use the in-place edit control and I’ve notice that the size of the control is affected by the zoom factor of the diagram.
I use both TextBox for names and ComboBox for types of links and when the user is in very big zoom the ComboBox is huge, also when I look at the entier diagram and the zoom is very small it’s hard to click on the ComboBox’s arrow or see the name in the TextBox.

I would like to make the edit-in-place control agnostic to the zoom factor.

Thank you,
Ido.

I haven’t tried this, but I believe you could override TextEditingTool.DoActivate to call the base method and then change the Scale on the TextEditingTool.TextEditor to counteract the normal scaling specified by the DiagramPanel.Scale.

Hi,
The TextEditingTool.TextEditor does not have Scale property.

One changes the scale of any FrameworkElement by specifying a ScaleTransform as the RenderTransform of the element. (This is not specific to GoXam.)

Hi,
Thank you for the clarification, I miss understood you.
I’ve try several things, non of them worked for me yet.
I’ve override the DoActivate method in my TextEditingTool and after calling the base implementation I’ve try the following:

Adornment adornment = AdornedPart.GetAdornment("TextEdit");

adornment.RenderTransform = System.Windows.Media.Transform.Identity;

but this did not change the way the editor control is presented.

I've then try this:

var firstElement = (FrameworkElement)VisualTreeHelper.GetChild(adornment, 0);

firstElement.RenderTransform = System.Windows.Media.Transform.Identity;

I got the visual element (TextBox or ComboBox) in the firstElement variable but that element did not had any RenderTransform applied to it.

Help will be great,

Thank you,

Ido.

Using Identity as the transform is not going to change the scale.

For example, if the Diagram.Panel.Scale is 0.5, you’ll want to use a new ScaleTransform(2, 2).