Import a custom control by adding a reference
As a designer, you might receive an assembly file (DLL) that contains a custom control that you have to use in your project. Or, you might want to use the controls that are available in the Silverlight 2 Software Development Kit (SDK) in your project. To be able to draw these kinds of controls on the artboard, you must first add a reference to the assembly.
To draw a custom control on the artboard
On the Project menu, click Add Reference (ALT+SHIFT+R).
In the Add Reference dialog box, browse to the DLL file that contains the custom control, and then click Open.
In the Project panel, under References, the DLL file appears in the list of default project references.
Tip
To be able to use the controls that come with the Silverlight 2 SDL, add a reference to the correct assembly located in the C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Libraries\Client folder. For example, to draw a TabControl, add a reference to the System.Windows.Controls.dll assembly.
Build your project (CTRL+SHIFT+B) to incorporate the classes from the DLL into your project.
Open a XAML file on the artboard (such as Page.xaml) by double-clicking the name of the file in the Projects panel.
Click the Asset Library button in the Toolbox.
In the Asset Library, select the Custom Controls tab, and then select your new control.
Tip
The controls that come with the Silverlight 2 SDK are listed in the Controls tab.
Your new control appears above the Asset Library button in the Toolbox as the selected tool.
Using your mouse, draw the custom control on the artboard.
The control appears on the artboard and under Objects and Timeline.
Test your project (F5) to see the new control.
Tip
You can add a reference to an uncompiled project by first adding the project to your solution and then adding the project reference to the first project. This is useful if you want to work on both projects at the same time in the same Expression Blend window. For more information, see Add a new or existing project to a solution.
Troubleshooting
If you cannot see the custom control displayed in the Custom Controls tab of the Asset Library, try to build the project before you open the Asset Library again.
After you draw your new control on the artboard, if it appears clipped, it might be because the control has default layout properties that are incompatible with the size of the control when you first drew it. With the new control selected under Objects and Timeline, reset the Margin properties to 0 under Layout in the Properties panel, and then try to resize the control again.