
I want the overlay to be visible on startup, but setting the IsOverlayVisible property to true doesn't seem to affect anything. How can I make the overlay appear when the window first appears?
I want the overlay to be visible on startup, but setting the IsOverlayVisible property to true doesn't seem to affect anything. How can I make the overlay appear when the window first appears?
Hi Kevin,
Thank you for writing. The problem here is that the WindowChrome doesn't fully initialize until when the Window.SourceInitialized event fires.
I found that adding this line in our WindowChromeProcessingOverlay sample's MainWindow constructor after InitializeComponent, the overlay did show:
this.Loaded += (sender, e) => WindowChrome.SetIsOverlayVisible(this, true);
It delays showing the overlay until the Window.Loaded event.
That being said, we will update the code for the upcoming 22.1 version to allow the overlay to be made visible without having to delay to the Loaded event.
This work around gets me up and running. Thanks, guys.
Please log in to a validated account to post comments.