Transparent floating window.
I'm trying to create transparent floating dockable window. But, having difficulting achieving this. Tried Opacity, but no luck.
Here is a snapshot of my code :
// Floating dockable split pane
SplitPane splitFloating = new SplitPane();
XamDockManager.SetInitialLocation(splitFloating, InitialPaneLocation.DockableFloating);
XamDockManager.SetFloatingLocation(splitFloating, new Point(my.XCoordinate, my.YCoordinate));
XamDockManager.SetFloatingSize(splitFloating, new Size(my.Width, my.Height));
TabGroupPane tgpFloating = new TabGroupPane();
ContentPane cpRichText = new ContentPane();
cpRichText.Content = new RichTextBox();
cpRichText.Opacity = 0.0;
tgpFloating.Items.Add(cpRichText);
tgpFloating.Opacity = 0.0;
splitFloating.Panes.Add(tgpFloating);
split开发者_JAVA技巧Floating.Opacity = 0.0;
this.DockManager.Panes.Add(splitFloating);
this.DockManager.Opacity = 0.0;
I don't know much about the Infragistics suite, but generally speaking you should set you Background
to Transparent
(if you want to be able to click on the background) or {x:Null}
(if you want to click through the background).
Also if it's a window (derives from System.Windows.Controls.Window
), you'll need to set AllowsTransparency
to true
as well, but this might incur some loss of performance.
精彩评论