X#, WPF/XAML and MVVM - nice working app for Cologne .............

Public forum to share code snippets, screen shorts, experiences, etc.
Post Reply
User avatar
Phil Hepburn
Posts: 743
Joined: Sun Sep 11, 2016 2:16 pm

X#, WPF/XAML and MVVM - nice working app for Cologne .............

Post by Phil Hepburn »

Hi guys,

Well, lets try out a few things in this post.

I have been working on my 'Stock' application for Cologne today, and have added some nice and interesting features - all X#, no C# is site. Even though it is based on Entity Framework 6, and the MVVM pattern of development using WPF/XAML technologies and LINQ in many, many, places.

This stuff is a joy to use and when Data Binding is done right it works like a dream, like a charm.

I am going to try a post directly a video clip I just made of part of the application. Robert has allowed us to post MP4 files since my first attempt a few weeks back.

The interesting bit we will see working in the video is a single PF form (window) which has a large part of it as a Content Control - this CC area can then have six different user controls swapped in and out by the button clicks (all RelayCommand driven).

We have one ViewModel for the WPF form, as the sixe UCs can be seen just as controls to the one form. All the screen data you see is Data Bound and so this means the attributes on the XAML controls are bound to Public Properties of the VM itself. Use PPs and binding works.

Each of five UCs allows the user to select an Entity object - customer, order, product etc., and the sixth 'summary' screen shows all the selected items. Once again these are public properties of the ViewModel.

The work is not complete as yet, the plan being to be able to delete from the SQL database each of the selected items - this last bit (the deleting) is missing - BUT - should only need a few lines of code.

Please let me know if you have issues playing the video and seeing some of the X# fun I have been having. Remember, I waited over six years to be able to do all this with one xBase language, and X# has hit the spot.

Best Regards,
Phil.
Wales, UK.

[The extension mp4 has been deactivated and can no longer be displayed.]

User avatar
wriedmann
Posts: 3757
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

X#, WPF/XAML and MVVM - nice working app for Cologne .............

Post by wriedmann »

Hi Phil,

I would go even further and say that the real fun begins with own usercontrols, together with complete databinding.

Maybe I have to prepare a sample for it. My door configurator uses some of house-built controls, all usable in a MVVM application.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Post Reply