Sign In
Delay's Blog
Silverlight, WPF, Windows Phone, Web Platform, .NET, and more...
Tags
AJAX Control Toolkit
Development Tips
MEF
Miscellaneous
Silverlight
Silverlight Toolkit
Technical
TextAnalysisTool
Utilities
Web Platform
Windows Phone
Windows Phone Toolkit
WPF
WPF Toolkit
Browse by Tags
MSDN Blogs
>
Delay's Blog
>
All Tags
>
development tips
Tagged Content List
Blog Post:
Invisible pixels are just as clickable as real pixels! [Tip: Use a Transparent brush to make "empty" parts of a XAML element respond to mouse and touch input]
David Anson
Tip Use a Transparent brush to make "empty" parts of a XAML element respond to mouse and touch input Explanation I got a question yesterday and thought the answer would make a good addition to my Development Tips series. As you probably know, WPF, Silverlight, and Windows Phone support a rich...
on
18 Aug 2011
Blog Post:
Breaking up (lines) is (not) hard to do [Tip: Put XAML attributes and elements on multiple lines so the markup is easy to read and work with]
David Anson
Tip Put XAML attributes and elements on multiple lines so the markup is easy to read and work with Explanation The last few tips have dealt with DependencyProperty issues. Now it's time for something completely different: XAML. While it's nice to pretend XAML editing can all be done in a design...
on
24 Jun 2010
Blog Post:
"I would prefer even to fail with honor than to win by cheating" [Tip: For a truly read-only custom DependencyProperty in Silverlight, use a read-only CLR property instead]
David Anson
Tip For a truly read-only custom DependencyProperty in Silverlight, use a read-only CLR property instead Explanation My last tip outlined the best way I knew to approximate a WPF-like read-only DependencyProperty on Silverlight. ( Aside : It's also a good way to implement coercion.) However...
on
2 Apr 2010
Blog Post:
Sometimes you just gotta do the best you can [Tip: Read-only custom DependencyProperties don't exist in Silverlight, but can be closely approximated]
David Anson
Tip Read-only custom DependencyProperties don't exist in Silverlight, but can be closely approximated Explanation My last tip discussed a special case of creating a Silverlight/WPF DependencyProperty where it's necessary to create a read-only property. ( Aside : Read-only DependencyProperties...
on
30 Mar 2010
Blog Post:
That's why it's called the default *value* instead of default *values* [Tip: The default value of a DependencyProperty is shared by all instances of the class that registers it]
David Anson
Tip The default value of a DependencyProperty is shared by all instances of the class that registers it Explanation The last two tips explained how to set the default value of a Silverlight/WPF DependencyProperty . But there's something you need to be aware of when you're using either technique...
on
29 Mar 2010
Blog Post:
When you have two good options, go with the easier one [Tip: Set DependencyProperty default values in a class's default style if it's more convenient]
David Anson
Tip Set DependencyProperty default values in a class's default style if it's more convenient Explanation In the previous tip , I explained why it's usually wrong to assign a value to a Silverlight/WPF DependencyProperty in the constructor for a class. The preferred way is to pass the default...
on
26 Mar 2010
Blog Post:
The platform giveth power, don't taketh it away [Tip: Do not assign DependencyProperty values in a constructor; it prevents users from overriding them]
David Anson
Tip Do not assign DependencyProperty values in a constructor; it prevents users from overriding them Explanation Initializing variables in an object's constructor is considered a Good Thing . Traditionally, initialization is done with a simple assignment that sets the variable to its initial...
on
25 Mar 2010
Blog Post:
Freedom isn't free [Tip: When creating a DependencyProperty, follow the handy convention of "wrapper+register+static+virtual"]
David Anson
Tip When creating a DependencyProperty, follow the handy convention of "wrapper+register+static+virtual" Explanation The fundamental steps for defining a Silverlight/WPF DependencyProperty are fairly rigid and not open to a great deal of flexibility (as I discuss in this earlier tip about the...
on
24 Mar 2010
Blog Post:
Do one thing, and do it well [Tip: The CLR wrapper for a DependencyProperty should do its job and nothing more]
David Anson
Tip The CLR wrapper for a DependencyProperty should do its job and nothing more Explanation The CLR wrapper for a Silverlight/WPF DependencyProperty exists purely as a convenience to the developer. The "real" value of a DependencyProperty is stored by the system and accessed by the GetValue...
on
23 Mar 2010
Blog Post:
Q: How do you eat an elephant? A: One bite at a time... [Announcing a new "Development Tips" series on my blog!]
David Anson
With all that's going on lately, more and more people are moving their development efforts to Silverlight and WPF. What's nice is that there are already a lot of great resources available to help developers learn the basics of Silverlight and WPF programming. Whether you prefer books, videos, blogs,...
on
23 Mar 2010
Page 1 of 1 (10 items)