How to stretch a control to fill a canvas in silverlight?

What I need to do is stretch the control to fill the entire canvas. I think I need to use Canvas (I don’t want my control to be cropped when it is displayed outside the container - as far as I know all other containers to crop - mesh, border ... - maybe there is another solution?)

If I put the control inside the Canvas, it works fine (I mean, it doesn't get cropped). However, it does not fill the entire canvas. I tried to snap to the width and height of the canvas - without any results.

Do you have any ideas or tips?

Thanks in advance!

+3
source share
1 answer

A control may exit a container, such as Borderor Grid, with negative margins. Therefore, perhaps you should go back to using Gridand playing around with the placement using the column and row definitions and use the negative fields where you need them.

+2
source

Source: https://habr.com/ru/post/1781744/


All Articles