Add FlexGrid to Application
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
- Create a WPF project in Visual Studio.
- Add the C1.WPF.FlexGrid .dll file to the References folder of your project.
- 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
- Create a WPF project in Visual Studio.
- Add the C1.WPF.FlexGrid.dll file to the References folder of your project.
- Switch to the code view, that is MainWindow.xaml.cs, and add the following reference statement.
- Add the following code in the MainWindow class constructor to add a FlexGrid control.
var grid = new C1FlexGrid();
Parent.Children.Add(grid);