Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Humm, We are experiencing a similar issue we are looking forward for a solution that will provide Design time support under Expression Blend 2.0 (Strong Type). Plus we are looking forward for a solution to have some Mock+Auto-Generated data sample available under Expression Blend.</p> <p>Of course we are looking also to have all those thing work using an IOC pattern.</p> <p>Paul Stovell as an interesting article to start with: <a href="http://www.paulstovell.com/blog/wpf-dependency-injection-in-xaml" rel="nofollow noreferrer">http://www.paulstovell.com/blog/wpf-dependency-injection-in-xaml</a></p> <p>So I try a couple thing to add more valuable design time support for Binding and mocking object at Design time, right now I’m having most of my problem related to get a strong typed connection made between the View (code) to the ModelView(Xaml), I tried a couple scenario:</p> <p>1.) Solution 1 : Using Generic to create the View</p> <pre><code>public class MyDotNetcomponent&amp;lt;T&amp;gt; : SomeDotNetcomponent { // Inversion of Control Loader… // Next step add the Inversion of control manager plus // some MockObject feature to work under design time public T View {Get;} } </code></pre> <p>This solution does not work since Blend does not support Generic inside is design surface but Xaml do have some, well work at runtime but not at design;</p> <p>2.) Solution 2: ObjectDataProvider</p> <pre><code>&lt;ObjectDataProvider ObjectType="{x:Type CP:IFooView}" /&gt; &lt;!-- Work in Blend --&gt; &lt;!—- IOC Issue: we need to use a concrete type and/or static Method there no way to achive a load on demande feature in a easy way --&gt; </code></pre> <p>3.) Solution 3: Inherit ObjectDataProvider</p> <pre><code>&lt;CWD:ServiceObjectDataProvider ObjectType="{x:Type CP:IFooView}" /&gt; &lt;!-- Cannot inherit from ObjectDataProvider to achive the right behavior everything is private--&gt; </code></pre> <p>4.) Solution 4: Create a mock ObjectDataProvider from scratch to the job</p> <pre><code>&lt;CWD:ServiceObjectDataProvider ObjectType="{x:Type CP:IFooView }" /&gt; &lt;!-- Not working in Blend, quite obvious--&gt; </code></pre> <p>5.) Solution 5: Create a Markup Extension (Paul Stovell)</p> <pre><code>&lt;CWM:ServiceMarkup MetaView="{x:Type CP:IFooView}"/&gt; &lt;!-- Not working in Blend --&gt; </code></pre> <p>Just to clear one point when I said “not working in blend” I mean that the Binding dialog is not usable and the designer needs to handwrite the XAML by itself.</p> <p>Our next step will probably be to take the time to evaluate the ability to create a plug-in for Expression Blend.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload