Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The image automatically fits in the middle of the canvas #12

Open
fanweiGit opened this issue Mar 7, 2022 · 1 comment
Open

The image automatically fits in the middle of the canvas #12

fanweiGit opened this issue Mar 7, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@fanweiGit
Copy link

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!

@mircea21S
Copy link
Owner

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 mircea21S added the enhancement New feature or request label Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
2 participants