SelectedCategory Property
SelectedCategory
Gets or sets currently selected toolbox category.
Declaration
public string SelectedCategory { get; }
Property Value
Type | Description |
---|---|
System.String |
Implements
Remarks
You can set the SelectedCategory category programmatically or manually.
Examples
Here is how to use a SelectedCategory in the C# code:
using Alternet.FormDesigner.Wpf;
using Alternet.FormDesigner.Wpf.Toolbox;
using System;
public partial class MainWindow : Window
{
private void Window_Loaded(object sender, RoutedEventArgs e)
{
var formDesigner = new FormDesignerControl();
formDesigner.AutoSaveToSource = false;
var toolboxControl = new ToolboxControl();
toolboxControl.FormDesigner = formDesigner;
toolboxControl.SelectedCategory = "Common WPF Controls";
}
}
Here is how to use a SelectedCategory in the Visual Basic code:
Imports Alternet.FormDesigner.Wpf
Imports Alternet.FormDesigner.Wpf.Toolbox
Imports System
Partial Public Class MainWindow
Inherits Window
Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim formDesigner = New FormDesignerControl()
formDesigner.AutoSaveToSource = False
Dim toolboxControl = New ToolboxControl()
toolboxControl.FormDesigner = formDesigner
toolboxControl.SelectedCategory = "Common WPF Controls"
End Sub
End Class