WPF and Silverlight Edition Basic Library / Drop Down / DropDown Elements / Creating Drop Down
Creating Drop Down

To create a C1DropDown control using XAML markup, complete the following steps:

  1. In the Visual Studio Solution Explorer, right-click the References folder in the project files list. In the context menu choose Add Reference, select the C1.WPF.4.dll assembly, and click OK.
  2. Add a XAML namespace to your project by adding xmlns:c1="http://schemas.componentone.com/wpf/Basic" to the initial <Window> tag. It will appear similar to the following:
XAML
Copy Code
<Window x:Class="C1WPFPropertyGridCS102809.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="288" Width="418" xmlns:c1="http://schemas.componentone.com/wpf/Basic">
  1. Add a <c1:C1DropDown> tag to your project within the <Grid> tag to create a C1DropDown control. The markup will appear similar to the following:
XAML
Copy Code
<Grid>
    <c1:C1DropDown Height="30" Name="C1DropDown1" Width="100"/>
</Grid>

This markup will create an empty C1DropDown control named "C1DropDown1" and set the control's size.