Basic Library for WPF and Silverlight | ComponentOne
WPF and Silverlight Edition Basic Library / RadialMenu / Quick Start: RadialMenu for WPF and Silverlight / Step 1: Creating a C1RadialMenu Application
In This Topic
    Step 1: Creating a C1RadialMenu Application
    In This Topic

    In this step, you begin by creating a WPF application in Visual Studio and then adding a C1RadialMenu control to your application.

    In XAML

    To add a C1RadialMenu control to your application, perform the following steps.

    1. Create a new WPF application in Visual Studio.
    2. Navigate to the Toolbox and locate C1RadialMenu control icon.
    3. Double-click the C1RadialMenu icon to add the control to the MainWindow.
    4. Open MainWindow.xaml if it is not already open and add the following markup within the <Window></Window> tags. The following markup adds style resources to define the layout of menu items content.
      XAML
      Copy Code
      <Window.Resources>
          <Style TargetType="TextBlock" x:Key="TextIconStyle">
              <Setter Property="Margin" Value="-10" />
              <Setter Property="FontSize" Value="20" />
              <Setter Property="FontFamily" Value="Segoe UI Symbol" />
              <Setter Property="FontWeight" Value="Normal" />
              <Setter Property="Foreground" Value="#333333" />
              <Setter Property="HorizontalAlignment" Value="Center" />
              <Setter Property="VerticalAlignment" Value="Center" />
          </Style>
          <Style TargetType="Image" >
              <Setter Property="Width" Value="25"/>
              <Setter Property="Height" Value="25"/>
              <Setter Property="Margin" Value="0"/>        
          </Style>
      </Window.Resources>
      
    5. Add the following markup within the <Grid></Grid> tags to add border definition to the application.
      XAML
      Copy Code
      <Border Background="LemonChiffon" MinHeight="40" BorderBrush="#969696" BorderThickness="1" Padding="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"></Border>
      

    With this, you completed the first step of this Quick Start guide.