我可以在不使用 winformshost 的情况下将 Lync SDK 对话停靠在 WPF 上吗?
我正在尝试构建一个以 Lync SDK 作为基础的应用程序,根据 MSDN 上的文档,我需要将对话窗口停靠在 winformshost 上。
但这里的问题是 winformshost 总是在最上面,没有不透明度支持,而且有点难用。所以看起来不是最好的选择。
我很好奇是否还有其他可以使用的控件?
对于对接,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);
}
}
每个答案都值得赞赏!谢谢...
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.
But the problem here is winformshost is always on top, no opacity support, and a bit hard to play with. 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;
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...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这是不可能的,因为对话窗口是本机窗口,而不是 WPF 窗口。由于 WPF 使用本机窗口/控件的唯一方法是通过 WindowsFormsHost,所以我很确定您会陷入困境。
不过我很乐意被证明是错的;)
I don't believe this is possible, as the Conversation Window is a native window, as opposed to a WPF window. 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.
I'd love to be proved wrong though ;)