SharpSVN SvnUI.绑定到WPF窗口 [英] SharpSVN SvnUI.Bind to WPF window

查看:106
本文介绍了SharpSVN SvnUI.绑定到WPF窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我猜想在WPF应用程序中无法绑定调用SharpSVN吗?我只是按照那里的教程学习,所以发现您不能绑定,因为这不是Windows.Forms应用程序.真是令人讨厌.我真的在那里煮了一分钟.

I am guessing there is no way to Bind call SharpSVN in a WPF application? I was just following there tutorial, and I found out that you can't bind becuase this isn't a Windows.Forms application. Quite the bummer. I was really cooking there for a minute.

推荐答案

当前答案是:否.

出于兼容性考虑,SharpSvn是针对.Net 2.0编译的,因此无权访问WPF类.

For compatibility SharpSvn is compiled against .Net 2.0, so doesn't have access to the WPF classes.

您可以实现自己的IWin32Window来提供Hwnd.

You could implement your own IWin32Window to provide a Hwnd.

谷歌搜索为我提供了此示例代码.

Googling a bit provided me this sample code.

public class Window1 : Window, IWin32Window
{
   public IntPtr Handle
   {
      get
      {
         var interopHelper = new WindowInteropHelper(this);
         return interopHelper.Handle;
      }
   }
}

这篇关于SharpSVN SvnUI.绑定到WPF窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆