Creating Lookless Controls for WPF and Silverlight
- Posted: Jun 22, 2009 at 11:50 AM
- 11,166 Views
- 3 Comments
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
- Mid Quality WMV (Lo-band, Mobile)
- MP3 (Audio only)
- MP4 (iPod, Zune HD)
This screencast is a continuation of a previous screencast entitled “Skins for WPF and Silverlight”. In this session we go beyond skinning built-in
controls and learn what’s required to create our own skinnable (or ‘lookless’) controls.
This screencast assumes existing knowledge about styles and templates, so if you aren’t up to speed on those topics please consider watching the skinning
screencast first.
The sample demonstrated in this screencast can be downloaded
here.
Comments Closed
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
This is a great presentation to distinguish from User Control to Custom Control
I am confused on how to make a Custom Control from User Control. Do I first make a User Control with all the limited functionalities, and then, make the Custom Control from that to add those data binding and style functionalities?
Is there a screencast for that? Thank you.
Great info thanks this article cleared up a gap for me.
@magicalclick
In this context a Custom Control is simply a dependency property class that inherits from Control instead of directly from DependencyObject. I assume the reasons are so it picks up features of the Control class for UI / (Other?) functionality whereas a straight DepO is not suitable.
The Custom Control becomes a backing store without any visual representation convoluting the intent / code. This is probably why it's called lookless. It doesn't know (or care) about how its own data is externally used, manipulated or represented. It just provides properties that expose this data to consumers. In the RW it would likely include data validation and a host of other methods focused on the minutiae of data processing. It's a perfect simple example of the fundamental WPF feature: Separation of UI / Code.
So to me your question seems backwards. You're wanting to try and turn a User Control into a Custom Control. To me that would mean you're trying to decompose the UI elements of the User Control into property code. Maybe what you're after/need instead is an Attached Properties (RegisterAttached) class and not an actual Custom Control class?
Remove this comment
Remove this thread
close