Hello Soapers,

The SoapBox Core article on codeproject describes how views are applied to view models via resource dictionaries that are merged into a single resource dictionary once the imports are all satisfied. For someone like me who is still learning WPF though, this pattern requires a lot of dynamic layout that would be much easier to do through XAML in the designer than in the ViewMode using C#. Does the fact that SoapBox uses MEF require that Resource Dictionaries be used along with layouts in C# or is there a way to import Windows that were created in the designer? If not, can someone suggest a resource that might help quell the fears that layout in C# is too hard/bug prone?

Thank you

asked 24 Aug '10, 12:20

KarlB's gravatar image

accept rate: 0%

edited 24 Aug '10, 12:41

Scott%20Whitlock's gravatar image

Scott Whitlock ♦♦

I suggest you write your Views as WPF UserControls, which has good designer support, and then just drop your finished UserControl into a DataTemplate for your ViewModel type. That should give you what you're looking for.


answered 24 Aug '10, 12:42

Scott%20Whitlock's gravatar image

Scott Whitlock ♦♦
accept rate: 50%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 24 Aug '10, 12:20

Seen: 1,976 times

Last updated: 24 Aug '10, 12:42

powered by OSQA