PreviewControl over all other controls?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a WPF window that I'm using a PreviewControl on. This window also has a 'flyout' for help that is part of a template. The flyout is on the template as the last listed item, so it's z index should be above anything inside the main frame which is where the preview control is placed. I even set the Panel.ZIndex on the flyout to 5000, yet the preview control still renders over the top of it:
Is this a known issue? More important is there a way to get it to render in it's proper index so the flyout covers it like it should? All other wpf controls render under the flyout but PreviewControl does not.
Also the PreviewControl is constructed in the winow constructor and added dynamically as it can't be generated otherwise as far as I understand. Here is the code:
var pc = new PreviewControl(doc, vw.Id) {IsManipulationEnabled = true};
pc.SetValue(Panel.ZIndexProperty, 20);
gd_PreviewControl.Children.Add(pc);
As you can see I also tried setting the z index of the preview control well below that of the flyout but still no luck.