如何保持浮动Infragistics contentpane wpf窗口始终“可见”?

时间:2021-08-23 19:47:39

Please need help. Have been struggling with this for last 24 hours.

请帮忙。过去24小时一直在努力解决这个问题。

I have a small floating Infragistics contentpane - width:100, height:100 which I'm placing over at coordinate x:10, y:10. There is a third party application window (x:0, y:0, width:640, height:640).

我有一个小的浮动Infragistics contentpane - 宽度:100,高度:100我在坐标x:10,y:10处放置。有第三方应用程序窗口(x:0,y:0,宽度:640,高度:640)。

How do I make my floating contentpane to stay visible all the time even if I were to click on the third party application ?

即使我点击第三方应用程序,如何让我的浮动内容窗格始终保持可见状态?

Also, I would like to remove the close button on this floating contentpane. I tried playing around with PaneHeaderPresenter style in the DockManagerGeneric.xaml, but no luck. The changes in the style seem to have an impact on the contentpanes docked, but not on floating contentpanes. I'm sure I'm missing something.

此外,我想删除此浮动内容窗格上的关闭按钮。我尝试在DockManagerGeneric.xaml中使用PaneHeaderPresenter样式,但没有运气。样式的变化似乎对停靠的内容窗格有影响,但对浮动内容窗格没有影响。我确定我错过了什么。

Kindly help.

2 个解决方案

#1


0  

Set the AllowClose to false in the Content Pane Property, the Close button would still be visible though.

在内容窗格属性中将AllowClose设置为false,但仍然可以看到关闭按钮。

#2


0  

For keeping the window on top of other applications, you can set the Topmost property of the Window to true in the ToolWindowLoaded event:

要使窗口保持在其他应用程序之上,可以在ToolWindowLoaded事件中将Window的Topmost属性设置为true:

void xamDockManager1_ToolWindowLoaded(object sender, Infragistics.Windows.DockManager.Events.PaneToolWindowEventArgs e)
{
    e.Window.AllowClose = false;
    Window w = Window.GetWindow(e.Window);
    w.Topmost = true;
}

For hiding the closing button, look at this post on the Infragistics forums.

要隐藏关闭按钮,请查看Infragistics论坛上的这篇文章。

#1


0  

Set the AllowClose to false in the Content Pane Property, the Close button would still be visible though.

在内容窗格属性中将AllowClose设置为false,但仍然可以看到关闭按钮。

#2


0  

For keeping the window on top of other applications, you can set the Topmost property of the Window to true in the ToolWindowLoaded event:

要使窗口保持在其他应用程序之上,可以在ToolWindowLoaded事件中将Window的Topmost属性设置为true:

void xamDockManager1_ToolWindowLoaded(object sender, Infragistics.Windows.DockManager.Events.PaneToolWindowEventArgs e)
{
    e.Window.AllowClose = false;
    Window w = Window.GetWindow(e.Window);
    w.Topmost = true;
}

For hiding the closing button, look at this post on the Infragistics forums.

要隐藏关闭按钮,请查看Infragistics论坛上的这篇文章。