Styling the TreeView

The TreeView for .NET MAUI allows you to style its look by using the following properties:

Telerik Maui Ninja image

The Styling is part of Telerik UI for .NET MAUI, the most comprehensive UI suite for .NET MAUI! To try it out, sign up for a free 30-day trial and kickstart your cross-platform app development today.

  • BackgroundColor(Color)—Specifies the background color of the control.
  • BorderColor(Color)—Specifies the border color of the control.
  • BorderBrush(Color)—Specifies the border brush of the control.
  • BorderThickness(Thickness)—Specifies the border thickness of the control.
  • CornerRadius(Thickness)—Specifies the corner radius of the control.
  • ContentPadding(Thickness)—Specifies the content padding of the control.

Styling the TreeView Item

Style all elements in the TreeView Item—label, image, checkbox, expand/collapse indicator. For more details, review the Item Style article.

Styling the Empty Template

When no data is displayed in the control, an empty template is visualized. Style the template by using the EmptyStyle property:

  • EmptyStyle(Style with target type telerik:ItemsEmptyView)—Specifies the style applied to the empty view.

You can use the following properties:

  • VerticalContentOptions (of type LayoutOptions)—Specifies the vertical layout options of the displayed content.
  • HorizontalContentOptions (of type LayoutOptions)—Specifies the horizontal layout options of the displayed content.
  • ContentTemplate (DataTemplate)—Specifies the content template of the empty view.

To customize the empty view, use the EmptyTemplate (DataTemplate) property.

See Also

In this article