Is there an MVC pattern for C # in WPF

Is there a template where in WPF I can create a simple UI form from a XML definition file retrieved from a database?

This will allow the user to enter data into this form and submit it back. The data will be sent back to an XML structure that will accurately / accurately mimic the UI definition.

The definition should include the data type and if it was the required value or not. Then I would like to map these data types and required values ​​to the Data Validation Rules, so the form cannot be submitted if it does not validate.

It must also handle the ability to have lists of duplicate data.

I'm in the planning stages of this project and have pretty good design flexibility at the moment, although I'm pretty sure I need to stick with the desktop and not the web since I can do some Office Inter-op stuff as well.

What technology stack would you recommend? I think XMAL and WPF might be close to the answer.

I also looked at XUL , but it doesn't seem ready or useful for C #. (Found this article from MSDN in 2002)

Thanks,
Keith

+1


source to share


4 answers


The View Presenter model seems to fit WPF well if you haven't heard of it yet, before checking out the Supervisor Controller pattern , which is a subset of MVP (I renamed it Controller Dispatcher and Passive View as two different flavors of MVP). This is a project leader who can help you push forward separation of concerns and works much better than MVC when you don't have a physical enforcement framework.



You can always try to create an ASP.NET MVC view engine that works with WPF, although that would be fine.

+1


source


Well, if you want to do something yourself, you can easily load and display dynamic XAML. Instead of allowing users to directly create XAML, you can have a subset "mapped" to the XML format of your choice that you XSL into valid XAML:



XmlReader tXml = XmlReader.Create(myXamlString);
UIElement MyElement = (UIElement)XamlReader.Load(tXml);

      

0


source


How about Caliburn ?

0


source


You might consider taking a look at the structure of CSLA.NET. You can read about it here, along with information about the well-written book that is available:

http://www.lhotka.net/Default.aspx

-Erik

0


source







All Articles