<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : WPF-binding to Navigation Properties</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : WPF-binding to Navigation Properties</description>
  <pubDate>Tue, 12 May 2026 23:33:26 -700</pubDate>
  <lastBuildDate>Tue, 11 Nov 2008 13:47:00 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=992</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>WPF-binding to Navigation Properties : We&amp;#039;re meeting to discuss...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=992&amp;PID=3609#3609</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 992<br /><strong>Posted:</strong> 11-Nov-2008 at 1:47pm<br /><br />We're meeting to discuss this on Thursday - I'll try to let you know something after that.<DIV></DIV>]]>
   </description>
   <pubDate>Tue, 11 Nov 2008 13:47:00 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=992&amp;PID=3609#3609</guid>
  </item> 
  <item>
   <title>WPF-binding to Navigation Properties : Thanks Greg,   Would you happen...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=992&amp;PID=3604#3604</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=394" rel="nofollow">allo</a><br /><strong>Subject:</strong> 992<br /><strong>Posted:</strong> 11-Nov-2008 at 10:25am<br /><br />Thanks Greg, <DIV>&nbsp;</DIV><DIV>Would you happen to know an&nbsp;approximate time&nbsp;of this next release?</DIV><span style="font-size:10px"><br /><br />Edited by allo - 11-Nov-2008 at 10:26am</span>]]>
   </description>
   <pubDate>Tue, 11 Nov 2008 10:25:08 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=992&amp;PID=3604#3604</guid>
  </item> 
  <item>
   <title>WPF-binding to Navigation Properties :  Originally posted by allo Question:...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=992&amp;PID=3597#3597</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 992<br /><strong>Posted:</strong> 10-Nov-2008 at 4:15pm<br /><br /><table width="99%"><tr><td class="BBquote"><strong><em>Originally posted by allo</strong></em><br /><br /><P>Question&nbsp;: how does one go about implementing such bindings without having to&nbsp;repeatedly move elements between&nbsp;&nbsp;relation collections and&nbsp;externally declared EntityList&lt;T&gt;-s?</P></td></tr></table> <DIV>&nbsp;</DIV><DIV>Navigation properties generated by the DevForce EF object Mapper are currently typed as IList&lt;T&gt;, although in fact what you are being returned is a RelatedEntityList&lt;T&gt;, and the returned list can be cast as such. In the future we may change these to return a RelatedEntityList&lt;T&gt; directly. (First we have to solve a problem or two that arises when related entity lists are returned in an anonymous type via a LINQ query.)</DIV><DIV>&nbsp;</DIV><DIV>Whatever type we return when you reference a navigation collection property, it won't (at least by default) implement INotifyCollectionChanged, because that interface is defined in the WindowsBase assembly, which is all about WPF, which is, of course,&nbsp;all about the presentation layer of an application, not the business model. Microsoft has worked hard to keep these layers separate, and so have we. A developer building an application with a DevForce EF persistence layer and a WinForm user interface might well wonder why he needs a reference to an assembly designed for WPF support!</DIV><DIV>&nbsp;</DIV><DIV>On the other hand, it is likely that whatever list we return will provide notification of changes in some form, possibly through implementation of IBindingList&lt;T&gt;.&nbsp; That seems to provide the same notification functionality that INotifyCollectionChanged does, except that it has the advantage of being recognized by Winforms data binding as well as WPF data binding. See this discussion from Rocky Lhotka:</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://forums.lhotka.net/forums/thread/17402.aspx" target="_blank">http://forums.lhotka.net/forums/thread/17402.aspx</A></DIV><DIV>&nbsp;</DIV><DIV>The best you can do meanwhile might be just to tell the control, when you update the list,&nbsp;to refresh itself. You can find discussions of that by googling "refresh wpf binding". E.g.,</DIV><DIV>&nbsp;</DIV><DIV><a href="http://blogs.msdn.com/jaimer/archive/2007/07/04/forcing-a-wpf-binding-to-refresh.aspx" target="_blank">http://blogs.msdn.com/jaimer/archive/2007/07/04/forcing-a-wpf-binding-to-refresh.aspx</A></DIV><DIV>&nbsp;</DIV><DIV>Pretty sure we'll have a better solution for you in the next release. </DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 10 Nov 2008 16:15:46 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=992&amp;PID=3597#3597</guid>
  </item> 
  <item>
   <title>WPF-binding to Navigation Properties : We havea WPF window thatallowsmodifying...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=992&amp;PID=3588#3588</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=394" rel="nofollow">allo</a><br /><strong>Subject:</strong> 992<br /><strong>Posted:</strong> 07-Nov-2008 at 2:44pm<br /><br /><P>We have&nbsp;a WPF window that&nbsp;allows&nbsp;modifying a Customer and also contains a&nbsp;ListView to display Customer.Addresses via&nbsp;a WPF binding.&nbsp;</P><DIV>When we add a new Address to&nbsp;a Customer, we do something like this:</DIV><DIV>newAddress.Customer&nbsp;= ourCustomer;</DIV><DIV>ourCustomer.Addresses_Reference.AddEntity(newAddress.EntityAspect.EntityKey);&nbsp; // probably unnecessary</DIV><DIV>&nbsp;</DIV><DIV>Although the ourCustomer.Addresses collection itself now&nbsp;contains&nbsp;the new address,&nbsp;it does not show up in the ListView. The&nbsp;binding is not triggered as the collection&nbsp;does not seem to be bindable:&nbsp;it does not implement the&nbsp;INotifyCollectionChanged interface required&nbsp;for WPF bindings.</DIV><DIV>&nbsp;</DIV><DIV>Question&nbsp;: how does one go about implementing such bindings without having to&nbsp;repeatedly move elements between&nbsp;&nbsp;relation collections and&nbsp;externally declared EntityList&lt;T&gt;-s?</DIV><DIV>While this workaround might work for a relatively small application,&nbsp;an enterprise app. containing hundreds of dialogs would suffer painfully.</DIV><DIV>&nbsp;</DIV><DIV>Thanks for any suggestions...</DIV>]]>
   </description>
   <pubDate>Fri, 07 Nov 2008 14:44:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=992&amp;PID=3588#3588</guid>
  </item> 
 </channel>
</rss>