Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Creating custom controls

Microsoft Expression Blend provides several different controls that you can style and use in your applications. However, if these controls do not meet a specific need that you have, you can create a custom control by programming a class that inherits from one of the System.Windows.Controls classes of Windows Presentation Foundation (WPF) or Microsoft Silverlight.

To include properties in your custom control that can be modified in the Properties panel of Expression Blend, define dependency properties in your class. For more information, see the WPF DependencyProperty Class and Silverlight DependencyProperty Class on MSDN.

To enable your custom control to be styled by modifying a template in Expression Blend, you'll have to include Generic.xaml with your control. For more information, see Guidelines for Designing Stylable Controls and Creating a Control That Has a Customizable Appearance on MSDN.

General information about creating custom controls can be found at WPF Control Customization and Silverlight Control Customization on MSDN.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.