WPF Use transforms to display an app level Overlay

81 Views Asked by At

I have a FrameworkElement nested as follows (ideally the solution shouldn't depend on a particular path though):

Window=>Grid=>ScrollViewer=>Grid[1]=>Grid[2].

I want my Grid[2] to be displayed as it would be an immediate child of Grid (or Window) with Margin=0 and both alignments set to Stretch (i.e. Dock=Fill kind of thing), using any of the transforms (since it's a form I need the buttons to remain clickable etc, so I'd favor LayoutTransform ). Obviously I want Grid[2] to become the topmost control.

Wonder if it's doable and if so what's the best way of doing that? Please note I can't re-assign Grid[2] parent using the behavior or anything I want everything to be done just by applying a transform.

Update 1 - Grid[2] has got no size, so it'd be nice if it can stretch as the window gets resized.

0

There are 0 best solutions below