C# WPF MVVM Example

Example requests & Code samples for GdPicture Toolkits.
Post Reply
DevonB
Posts: 1
Joined: Tue Jul 08, 2014 11:06 pm

C# WPF MVVM Example

Post by DevonB » Tue Jul 08, 2014 11:09 pm

Hi there.

I was wondering if anyone could provide a C# WPF MVVM Example for me to use as a reference?

I'm struggling with binding the GDViewer document source to my viewmodel.

Any assistance would be greatly appreciated!!

Here is my code snippet. I've removed a few properties for the sake of space...

Code: Select all

<dxlc:LayoutItem>
         <UserControl Margin="12,0,12,12" Name="WindowsFormsHost1" Height="191" VerticalAlignment="Bottom">
                  <gdpicture:GdViewer x:Name="m_GDViewer" BackColor="White" Margin="5,5,5,5" />
          </UserControl>
</dxlc:LayoutItem>
Regards,
Devon Britton.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: C# WPF MVVM Example

Post by Loïc » Sun Jul 13, 2014 7:09 pm

Hello,

In GdPicture 10 all usercontrols are Winform. I don't think it is possible to stay in the MVVM pattern without encapsulating each winform control in a WPF control by using extensive data binding, and I personally never tried that.
That said, the upcoming version 11 of GdPicture will be release with pure WPF controls.

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest