问题
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.
回答1:
Currently the answer is: No.
For compatibility SharpSvn is compiled against .Net 2.0, so doesn't have access to the WPF classes.
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;
}
}
}
来源:https://stackoverflow.com/questions/8760846/sharpsvn-svnui-bind-to-wpf-window