Search code examples
wpfbindsharpsvn

SharpSVN SvnUI.Bind to WPF window


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.


Solution

  • 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;
          }
       }
    }