透明浮动窗口。

发布于 2024-10-19 09:31:45 字数 876 浏览 0 评论 0原文

我正在尝试创建透明的浮动可停靠窗口。但是,实现这一目标却很困难。尝试过不透明度,但没有成功。

这是我的代码的快照:

    // 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);

    splitFloating.Opacity = 0.0;



    this.DockManager.Panes.Add(splitFloating);

    this.DockManager.Opacity = 0.0;

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);

    splitFloating.Opacity = 0.0;



    this.DockManager.Panes.Add(splitFloating);

    this.DockManager.Opacity = 0.0;

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

╰つ倒转 2024-10-26 09:31:45

我对 Infragistics 套件了解不多,但一般来说,您应该将 Background 设置为 Transparent(如果您希望能够点击 em> 背景)或 {x:Null}(如果您想穿过背景单击)。

此外,如果它是一个窗口(源自System.Windows.Controls.Window),则需要设置AllowsTransparency 也设置为 true,但这可能会导致一些性能损失。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文