简体   繁体   English

是否可以在不使用winformshost的情况下将Lync SDK对话停靠在WPF上?

[英]Can I dock Lync SDK conversation on WPF without using winformshost?

I'm trying to build an application taking Lync SDK as a base, according to documentation on MSDN I need to dock the conversation windows on a winformshost. 根据MSDN上的文档,我正在尝试以Lync SDK为基础构建应用程序,我需要将对话窗口停靠在winformshost上。

But the problem here is winformshost is always on top, no opacity support, and a bit hard to play with. 但是这里的问题是winformshost始终处于最前面,没有不透明性支持,并且使用起来有些困难。 So doesn't seem like the best choice. 因此,似乎不是最佳选择。

I was curious if there is another control that I can use? 我很好奇是否可以使用另一个控件?

For docking Lync uses these lines of code basically WindowsFormsHost.Child.Invoke() to dock and WindowsFormsHost.Child.Hide to undock; 对于停靠,Lync使用这些代码行基本上是WindowsFormsHost.Child.Invoke()停靠,而WindowsFormsHost.Child.Hide取消停靠。

delegate void DockConversationDelegate(string ConversationId);

myFormsHost.Child.Invoke(new DockConversationDelegate(DockTheConversation), 
      new object[] { _ConversationToDock });

public void WindowPanelHandle(string ConversationId, int PanelHandle)
{
   Microsoft.Lync.Model.Conversation.Conversation conversationToDock;
   if (myNewConversation.TryGetValue(ConversationId, out conversationToDock))
   {
       ConversationWindow cw = _automation.GetConversationWindow(conversationToDock);
       cw.Dock((IntPtr)PanelHandle);
    }
}

Every answer is appreciated! 每个答案表示赞赏! Thanks... 谢谢...

I don't believe this is possible, as the Conversation Window is a native window, as opposed to a WPF window. 我认为这是不可能的,因为“对话窗口”是本机窗口,而不是WPF窗口。 As the only way WPF has of using native windows/controls is via the WindowsFormsHost, then i'm pretty sure you're stuck with that. 由于WPF使用本机Windows /控件的唯一方法是通过WindowsFormsHost,因此我很确定您对此感到困惑。

I'd love to be proved wrong though ;) 我很想证明自己是错的;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM