I have to maintain constant 5-pixel padding of Diagram.Panel across all zoom levels of diagram.
In our earlier discussion for different requirement,
You have provided two solutions over there. I used first solution for my earlier requirement and it is working fine.
Using the same solution(5-pixel by Diagram.Panel.Scale), i am trying to apply for a padding thickness. But for this case, it is not applied. The padding pixel values are varying for different zoom levels,
For e.g: the below padding are applied for respective zoom levels
200% - 6 5 6 9
300% - 9 5 6 11
400% - 8 7 11 13
500% - 10 9 13 5
Even i tried setting padding as 0, but there are some padding thickness applied.
And i am setting the padding value in IncreaseZoom and DecreaseZoom methods of derived class of CommandHandler.
Is there any other way or am i doing any mistakes in this case of setting the padding?
Maybe. I still don’t understand exactly what you want. I’m just thinking that maybe you can get the “constant space” that you want without having it be subject to scaling by arranging the elements outside of the DiagramPanel rather than within it.
If so, you might find it best to style or replace the Diagram.Template. That way you can arrange it the way that you want. The standard ControlTemplate is given in the Themes/Generic.xaml file.