The code sample below creates a set of visual controls that reproduces the interface of QueryBuilder control:

using ActiveQueryBuilder.View.WPF.QueryView;
queryView = new QueryView { Query = sqlQuery };

var designPaneControl = new DesignPaneControl();

var propertiesBar = GetPanel(new PropertiesBar(), "Properties", Docking.Right);
var subQueryNavBar = GetPanel(new SubQueryNavBar(), "Sub-query Stucture", Docking.Right);

var dockManager = new DockManager();
dockManager.Children.Add(propertiesBar);
dockManager.Children.Add(subQueryNavBar);
dockManager.Children.Add(designPaneControl);

var splitterRow = new GridSplitter { VerticalAlignment = VerticalAlignment.Top, HorizontalAlignment = HorizontalAlignment.Stretch };

var queryColumnList = new QueryColumnListControl();
queryView.Children.Add(queryColumnList);
queryView.Children.Add(splitterRow);
queryView.Children.Add(dockManager);

The next piece of code does almost the same, but places the Query Columns List control into the bottom dock panel:

using ActiveQueryBuilder.View.WPF.QueryView;
queryView = new QueryView { Query = sqlQuery };

var designPaneControl = new DesignPaneControl();

var propertiesBar = GetPanel(new PropertiesBar(), "Properties", Docking.Right);
var subQueryNavBar = GetPanel(new SubQueryNavBar(), "Sub-query Stucture", Docking.Right);
var queryColumnListBar = GetPanel(new QueryColumnListControl(), "Query Columns", Docking.Bottom);

var dockManager = new DockManager();
dockManager.Children.Add(propertiesBar);
dockManager.Children.Add(subQueryNavBar);
dockManager.Children.Add(queryColumnListBar );
dockManager.Children.Add(designPaneControl);

queryView.Children.Add(dockManager);


Is this article helpful for you?