Completed
Last Updated: 11 Oct 2023 08:02 by ADMIN
Release 6.3.0
Alexey
Created on: 28 Sep 2023 13:03
Category: TreeView
Type: Bug Report
1
TreeView: Label LineBreak mode properties are not respected in ItemTemplate

When setting LineBreakMode properties in Label inside the TreeView ItemTemplate, the properties are not respected. 

            <treeview:TreeViewDescriptor
			ItemsSourcePath="Children"
			TargetType="{x:Type models:Folder}">
                <treeview:TreeViewDescriptor.ItemTemplate>
                    <DataTemplate>
                        <Grid ColumnDefinitions="Auto, *, Auto">

                            <Label
				Grid.Column="0"
				FontFamily="MaterialIcons"
				FontSize="22.0"
				Text="Folder"
				TextColor="Peru"
				VerticalOptions="Center" />

                            <Label
				Grid.Column="1" 
				Margin="6.0,0.0"
				LineBreakMode="TailTruncation"
				Text="Item with loooooooooooooooong naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaammmmmmmmmmmmmmeeeeeeeeeeeeee"
				VerticalOptions="Center" />

                            <Button Text=". . ."
				Grid.Column="2"
				BackgroundColor="Transparent"
				WidthRequest="64.0">
                            </Button>
                        </Grid>
                    </DataTemplate>
                </treeview:TreeViewDescriptor.ItemTemplate>
            </treeview:TreeViewDescriptor>

1 comment
ADMIN
Didi
Posted on: 28 Sep 2023 13:09

Workaround 

Set width to the Label or enable TreeView horizontal scrolling by setting the ScrollOrientation to Both.

Regards,


Didi
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com