RichCanvas icon indicating copy to clipboard operation
RichCanvas copied to clipboard

The image automatically fits in the middle of the canvas

Open fanweiGit opened this issue 3 years ago • 1 comments

Hi, I want to realize that the picture automatically adapts to the canvas, so that the picture is in the middle of the canvas, is there a way to get the width and height of the RichItemsControl or other methods to achieve this function? whether I can do it with an extension method that changes coordinates similar to what ShouldBringIntoView does (as the MakeVisible method does) Trouble you again,Thank you so much. Best Wishes!

fanweiGit avatar Mar 07 '22 07:03 fanweiGit

Hi, You should be able to get the ActualWidth and ActualHeight from the RichItemsControl. Also you can wrap your RichItemsControl in another Panel or any other object and use that size.

Anyway, I will expose a property on RichItemsControl to see the current Viewport size.

Thanks.

mircea21S avatar Mar 07 '22 09:03 mircea21S