透明浮动窗口。
我正在尝试创建透明的浮动可停靠窗口。但是,实现这一目标却很困难。尝试过不透明度,但没有成功。
这是我的代码的快照:
// 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我对 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
toTransparent
(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 setAllowsTransparency
totrue
as well, but this might incur some loss of performance.