Skip to main content

Posts

Showing posts with the label TreeView

TreeView in WPF

Introduction A TreeView represents data in a hierarchical view in a parent child relationship where a parent node can be expanded or collapse. The left side bar of Windows Explorer is an example of a TreeView.The TreeView tag represents a WPF TreeView control in XAML. <TreeView>TreeView>The Width and Height properties represent the width and the height of a TreeView. The Name property represents the name of the control, which is a unique identifier of a control. The Margin property tells the location of a TreeView on the parent control. The HorizontalAlignment and VerticalAlignment properties are used to set horizontal and vertical alignments. The following code snippet sets the name, height, and width of a TreeView control. The code also sets horizontal alignment to left and vertical alignment to top. <TreeView Margin="10,10,0,13" Name="TreeView1" HorizontalAlignment="Left"VerticalAlignment="Top" Width="194" Height…