<?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 : Property names</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Property names</description>
  <pubDate>Wed, 15 Apr 2026 00:50:53 -700</pubDate>
  <lastBuildDate>Sat, 22 Jan 2011 15:39:37 -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=2452</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>Property names : Thank you DenisK, this gives me...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2452&amp;PID=9754#9754</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=508" rel="nofollow">tj62</a><br /><strong>Subject:</strong> 2452<br /><strong>Posted:</strong> 22-Jan-2011 at 3:39pm<br /><br />Thank you DenisK, this gives me some idas.]]>
   </description>
   <pubDate>Sat, 22 Jan 2011 15:39:37 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2452&amp;PID=9754#9754</guid>
  </item> 
  <item>
   <title>Property names : Hi tj62;There are several options...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2452&amp;PID=9738#9738</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2452<br /><strong>Posted:</strong> 21-Jan-2011 at 10:53am<br /><br /><div>Hi tj62;</div><div><br></div><div>There are several options that I know of to minimize the error of binding with a property that doesn't exist:</div><div><br></div>1. When debugging, the debug output window should show something like this in the event of binding error.<div><br></div><div>System.Windows.Data Error: BindingExpression path error: 'Outputxxxxx' property not found on 'SilverlightApplication1.MainPageViewModel' 'SilverlightApplication1.MainPageViewModel' (HashCode=53180767). BindingExpression: Path='Outputxxxxx' DataItem='SilverlightApplication1.MainPageViewModel' (HashCode=53180767); target element is 'System.Windows.Controls.TextBox' (Name='txtOutput'); target property is 'Text' (type 'System.String')..</div><div><br></div><div>2. You can use a Fallback value markup as a default value in case a binding error occurs.</div><div><br></div><div><div>&lt;TextBox Name="txtOutput"</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Text="{Binding Outputxxxxx, FallbackValue='Binding has failed'}"</div></div><div><br></div><div>3. By googling this, I was able to find other options that other developers seem to use. One of them that I think is more helpful than the rest is this.</div><div><br></div><div><a href="http://karlshifflett.wordpress.com/2009/06/08/glimpse-for-silverlight-viewing-excepti&#111;ns-and-binding-errors/" target="_blank">http://karlshifflett.wordpress.com/2009/06/08/glimpse-for-silverlight-viewing-exceptions-and-binding-errors/</a></div><div><br></div><div>Hope this helps.</div>]]>
   </description>
   <pubDate>Fri, 21 Jan 2011 10:53:07 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2452&amp;PID=9738#9738</guid>
  </item> 
  <item>
   <title>Property names : Well found the answere to my later...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2452&amp;PID=9727#9727</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=508" rel="nofollow">tj62</a><br /><strong>Subject:</strong> 2452<br /><strong>Posted:</strong> 20-Jan-2011 at 7:18am<br /><br />Well found the answere to my later question so forget that one:<div>EntItem.EntityPropertyNames.p_tsID &nbsp;returns "p_tsID" and so on.</div><div><br></div><div>The first question is still open.</div>]]>
   </description>
   <pubDate>Thu, 20 Jan 2011 07:18:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2452&amp;PID=9727#9727</guid>
  </item> 
  <item>
   <title>Property names : Hi,One of theweaknessesin XAML...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2452&amp;PID=9723#9723</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=508" rel="nofollow">tj62</a><br /><strong>Subject:</strong> 2452<br /><strong>Posted:</strong> 20-Jan-2011 at 4:06am<br /><br />Hi,<div>One of the&nbsp;weaknesses&nbsp;in XAML and Silverlight is when you are doing&nbsp;data binding, where you&nbsp;refer&nbsp;to a bound property by the property name in the XAML. If you do a typo in the XAML or change the property name in the C# code forgetting to update it in the XAML code you get no binding.<br><br>Is there any method of avoiding this for example by static resources?<br><br>A related question is regarding the OnPropertyChanged event. Example below where overriding that event handler in an Entity class:</div><div><br></div><div><p ="Ms&#111;normal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:  normal;mso-layout-grid-align:n&#111;ne;text-autospace:n&#111;ne"><span ="Apple-style-span" style="font-family: C&#111;nsolas; font-size: 13px; "><span style="mso-spacerun:yes">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span></span><span ="Apple-style-span" style="font-family: C&#111;nsolas; font-size: 13px; "><span style="color:blue">protected</span></span><span ="Apple-style-span" style="font-family: C&#111;nsolas; font-size: 13px; "></span><span ="Apple-style-span" style="font-family: C&#111;nsolas; font-size: 13px; "><span style="color:blue">override</span></span><span ="Apple-style-span" style="font-family: C&#111;nsolas; font-size: 13px; "> </span><span ="Apple-style-span" style="font-family: C&#111;nsolas; font-size: 13px; "><span style="color:blue">void</span></span><span ="Apple-style-span" style="font-family: C&#111;nsolas; font-size: 13px; ">OnPropertyChanged(System.ComponentModel.</span><span ="Apple-style-span" style="font-family: C&#111;nsolas; font-size: 13px; "><span style="color:#2B91AF">PropertyChangedEventArgs</span></span><span ="Apple-style-span" style="font-family: C&#111;nsolas; font-size: 13px; ">e)</span></p><p ="Ms&#111;normal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:  normal;mso-layout-grid-align:n&#111;ne;text-autospace:n&#111;ne"><span style="font-size:  9.5pt;font-family:C&#111;nsolas;mso-bidi-font-family:C&#111;nsolas"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p><p ="Ms&#111;normal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:  normal;mso-layout-grid-align:n&#111;ne;text-autospace:n&#111;ne"><span style="font-size:  9.5pt;font-family:C&#111;nsolas;mso-bidi-font-family:C&#111;nsolas"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color:blue">base</span>.OnPropertyChanged(e);<o:p></o:p></span></p><p ="Ms&#111;normal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:  normal;mso-layout-grid-align:n&#111;ne;text-autospace:n&#111;ne"><span style="font-size:  9.5pt;font-family:C&#111;nsolas;mso-bidi-font-family:C&#111;nsolas"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color:blue">if</span>(e.PropertyName== <span style="color:#A31515">"p_tsID"</span> || e.PropertyName == <span style="color:#A31515">"p_ts"</span>)<o:p></o:p></span></p><p ="Ms&#111;normal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:  normal;mso-layout-grid-align:n&#111;ne;text-autospace:n&#111;ne"><span style="font-size:  9.5pt;font-family:C&#111;nsolas;mso-bidi-font-family:C&#111;nsolas"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun:yes">&nbsp;</span>{<o:p></o:p></span></p><p ="Ms&#111;normal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:  normal;mso-layout-grid-align:n&#111;ne;text-autospace:n&#111;ne"><span style="font-size:  9.5pt;font-family:C&#111;nsolas;mso-bidi-font-family:C&#111;nsolas"><span ="Apple-tab-span" style="white-space:pre">		</span>//&nbsp;Do some stuff</span></p><p ="Ms&#111;normal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:  normal;mso-layout-grid-align:n&#111;ne;text-autospace:n&#111;ne"><span ="Apple-style-span" style="font-family: C&#111;nsolas; font-size: 13px; "><span style="mso-spacerun:yes">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span>}</span></p><p ="Ms&#111;normal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:  normal;mso-layout-grid-align:n&#111;ne;text-autospace:n&#111;ne"><span style="font-size:  9.5pt;font-family:C&#111;nsolas;mso-bidi-font-family:C&#111;nsolas"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p><p ="Ms&#111;normal" style="margin-bottom: 0.0001pt; "><font ="Apple-style-span" size="2"><span ="Apple-style-span" style="line-height: normal;">In the above example can I somehow get the property names by code instead of using hard-coded strings ("p_tsID", "p_ts")? That would eliminate the risk if I later decide to change the name of those properties in the entity model and forget to update those strings&nbsp;accordingly.</span><br><span ="Apple-style-span" style="line-height: normal;">You have this possibility in the EntitySet's via the EntitySetName property. But I can't find how to access that for Entity-Properties.</span></font></p></div>]]>
   </description>
   <pubDate>Thu, 20 Jan 2011 04:06:23 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2452&amp;PID=9723#9723</guid>
  </item> 
 </channel>
</rss>