FlexGrid for WPF | ComponentOne
In This Topic
    Add FlexGrid to Application
    In This Topic

    The FlexGrid control can be added to a WPF application through XAML designer or through code as illustrated below.

    To add FlexGrid through XAML designer

    1. Create a WPF project in Visual Studio.
    2. Add the C1.WPF.FlexGrid .dll file to the References folder of your project.
    3. Add the following code in the XAML markup to create a FlexGrid control.
      <Window x:Class="FilterRow.MainWindow"
              ...
              xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
              ... >
          <Grid x:Name="LayoutRoot">
              <c1:C1FlexGrid/>
          </Grid>
      </Window>
      

    To add FlexGrid through code

    1. Create a WPF project in Visual Studio.
    2. Add the C1.WPF.FlexGrid.dll file to the References folder of your project.
    3. Switch to the code view, that is MainWindow.xaml.cs, and add the following reference statement.
      using C1.WPF.FlexGrid;
      
    4. Add the following code in the MainWindow class constructor to add a FlexGrid control.
      var grid = new C1FlexGrid();
      Parent.Children.Add(grid);
      
    See Also