tag:blogger.com,1999:blog-887975141009593463.post4538383774464102907..comments2024-02-05T00:21:35.654-08:00Comments on HackingSilverlight: Dependency Properties Made EasyAnonymoushttp://www.blogger.com/profile/00903732036325261650noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-887975141009593463.post-27579263733986974492016-10-16T00:55:39.693-07:002016-10-16T00:55:39.693-07:00Are you trying to earn money from your visitors by...Are you trying to <b>earn money</b> from your <b>visitors</b> by using <b>popunder ads</b>? <br />If so, have you ever used <b><a href="http://syntaxlinks.com/affiliate-network-reviews/network/8/Ero-Advertising/" rel="nofollow">Ero-Advertising</a></b>?Bloggerhttps://www.blogger.com/profile/07287821785570247118noreply@blogger.comtag:blogger.com,1999:blog-887975141009593463.post-89500109058201698692010-06-04T07:23:52.619-07:002010-06-04T07:23:52.619-07:00On thing I would add on this, which was an occasio...On thing I would add on this, which was an occasional issue with some of the development work I've done in the past. <br /><br />When setting default values on DPs, make sure you have explicitly defined the value, no inference of a value is made during runtime. <br /><br />For your example if you wanted a default value for say blending etc. you might tweak your DP register method's PropertyMetadata as such:<br /><br />public static readonly DependencyProperty MinimumProperty =<br /> DependencyProperty.Register("Minimum", typeof(double), typeof(Dial),<br /> new PropertyMetadata(0.0, new PropertyChangedCallback(OnMinimumChanged)));<br /><br />Notice how the default value on the PropertyMetadata isn't just 0. If the value isn't 0.0 (for this specific scenario) it will throw a run time error when that DP is called either in Blend or in the SL app. <br /><br />One other thing to add to this. Robby Ingebretsen has some great snippets for DPs that save a ton of time. <br />http://blog.nerdplusart.com/archives/silverlight-code-snippetsUnknownhttps://www.blogger.com/profile/00544804267245451108noreply@blogger.com