Search code examples
c#wpfxamlclippingmainwindow

Displaying wpf content over/outside main window bounds


I am trying to achieve an effect of overlapping the main window boundary with a control. It's hard to explain this in words which is also maybe why I am having difficulty finding information on how to do this or if it is even possible.

Below is an example of the effect I am trying to get (from the designer), where the "note" objects float outside the bounds of the main window.

Example 1

However the effect I get at runtime is this (below), the inner controls are clipped by the boundary of the main window.

Example 2

Can someone please tell me if this is possible (or not), and if it is maybe some suggestions about how I could get this effect.


Solution

  • I don't think there's a way to draw outside the bounds of a window. However, you could simply create a new window for the note control and align it to your main window.