ComponentOne Basic Library for UWP
Step 1 of 3: Creating an Application with a C1DropDown Control
UWP Edition Basic Library > DropDown for UWP > C1DropDown Quick Start > Step 1 of 3: Creating an Application with a C1DropDown Control

In this step, you'll create a UWP application in Visual Studio using DropDown for UWP.

  1. In Visual Studio 2013 Select File | New | Project.
  2. In the New Project dialog box, select Templates | Visual C# | Windows | Universal. From the templates list, select Blank App (Universal Windows). Enter a Name and click OK to create your project.
  3. Open MainPage.xaml if it isn't already open. 
  4. Edit your opening <Page> tag to add the following namespace:
Copy Code
  1. Locate the <Grid> </Grid> tags on your page and insert the following to define your Grid rows:
Copy Code
            <RowDefinition Height="Auto"/>
  1. Directly below the row definitions, add a CheckBox using the following markup:
Copy Code
<CheckBox Content="AutoClose - determines if C1DropDown will automatically close when focus is lost." IsChecked="{Binding ElementName=c1DropDown1, Path=AutoClose, Mode=TwoWay}" Margin="10"/>
  1. Use the following markup to add a C1DropDownButton control:
Copy Code
<Xaml:C1DropDownButton Grid.Row="1" Background="White" x:Name="c1DropDown1" Padding="2" Width="150" HorizontalAlignment="Center" VerticalAlignment="Center" > </Xaml:C1DropDownButton>
  1.  Next, we'll add some Header content to customize the C1DropDownButton.Header:
Copy Code
  <Border x:Name="dropDownBorder" Background="White" />

What You've Accomplished

In this step, you created a new Visual Studio Universal Windows application, added a CheckBox control, and added and began customizing a C1DropDown control.

See Also