开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜