How do I add custom controls to an application using Microsoft Expression Blend ?

Expression Blend supports custom controls to be added to a WPF application. To add a custom control to a WPF application the following steps have to be performed. 1. Select Add Reference from Project Menu. 2. Browse and select the dll that contains the definition of the custom control. 3. Select Asset library from toolbox. 4. Select custom controls tab and select the necessary control from the list.

How to write some XML into IsolatedStorage?

[C#] Stream mystream = new IsolatedStorageFileStream( storeFileName, FileMode.Create, isoStorage ); if( null != mystream ) { XmlTextWriter xmlwriter = new XmlTextWriter(mystream, Encoding.UTF8); this.WriteDateToWriter( xmlwriter ); xmlwriter.Flush(); stream.Close(); }

How can I mark the default value of a custom dependency property to be false?

Here is an example : [C#] public class MyStateControl : ButtonBase { public MyStateControl() : base() { } public Boolean State { get { return (Boolean)this.GetValue(StateProperty); } set { this.SetValue(StateProperty, value); } } public static readonly DependencyProperty StateProperty = DependencyProperty.Register( ‘State’, typeof(Boolean), typeof(MyStateControl),new PropertyMetadata(false)); }

How can I create Custom Read-Only Dependency Properties ?

The typical reason for specifying a read-only dependency property is that these are the properties that is used to determine the state, but where the state is defined in a multitude of factors. A typical example for a read-only property is IsMouseHover This example shows how to ’register’ an attached property as read-only. You can use dependency properties on any ’DependencyObject’ types. [C#] public static readonly DependencyProperty IsBubbleSourceProperty = DependencyProperty.RegisterReadOnly( ‘IsBubbleSource’, typeof(Boolean), typeof(AquariumObject), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender) );