Telerik Forums
UI for .NET MAUI Forum
1 answer
112 views

From the Help Page...

The ListView provides UI virtualization, which requires the visual parent to provide vertical or horizontal space. To avoid breaking UI virtualization or gesture mechanisms:

  • Do not place the ListView inside a StackLayout or inside a ScrollView.
  • Do not set the ListView to a RowDefinition Height="Auto" Grid definition.

 

Does this mean that a ListView cant be placed as a child of a Scroll View under any circumstance, or its immediate parent cant be a ScrollView? Same question for the Grid RowDefinition. If using nested grids, must all parent grids rows have a Height specified, or is it only the immediate parent? Also is * ok for the Height?

Seems like ListView is severely limited to being the only control on the page/view if this is the case.

Didi
Telerik team
 answered on 06 May 2024
1 answer
58 views

 

I'm trying to replicate the signature pad control at this page: https://docs.telerik.com/devtools/maui/controls/signaturepad/events

On the control it shows an 'X' button to clear the signature but the XAML does not seem to include this or set any property etc.  If I copy the  example XAML into a View it also does not show up (tested in Android and Windows emulator).

So how is this rendered?  Is there  a property the XAML is missing or did you do some fancy XAML with a separate 'X' button overlaid?

Either way, that page need to be updated either with the correct XAML or to make it clear how the 'X' is being rendered.

Thanks,

Mike

 

Didi
Telerik team
 answered on 06 May 2024
1 answer
34 views

It seems that Hot Reload does not work for any controls with the MainContent or DrawerContent of the RadSideDrawer.

Will there be a fix for this soon as having no hot reload severely slows down development time for us.

Didi
Telerik team
 answered on 03 May 2024
1 answer
56 views

I have worked through the grouping help docs to set up a ListView with grouping. I would like to provide a means to group the list elements as follows..

When the Group By Gateway switch is on the list is grouped as shown above. When the switch is off it shows the list without the group headers as shown below....

I have tried to meld the example code to meet my desired outcome by binding the switch to the following property on the view model.


	private bool _isNodeIdGroupSwitchToggled = false;
	public bool IsNodeIdGroupSwitchToggled
	{
		get { return _isNodeIdGroupSwitchToggled; }
		set
		{
			if (SetProperty(ref _isNodeIdGroupSwitchToggled, value))
			{
				UpdateExistingGroupDescriptor(nameof(IsNodeIdGroupSwitchToggled), _isNodeIdGroupSwitchToggled);
			}
		}
	}

	private ObservableCollection<GroupDescriptorBase> _groupDescriptors;
	public ObservableCollection<GroupDescriptorBase> GroupDescriptors
	{
		get { return _groupDescriptors; }
		set { SetProperty(ref _groupDescriptors, value); }

	}

	private void UpdateExistingGroupDescriptor(string propertyToUpdate, bool IsOn)
	{
		if (GroupDescriptors == null)
			return;

		if (IsOn)
		{
			if (GroupDescriptors.Count == 0)
			{
				GroupDescriptors.Add(new ListViewPropertyGroupDescriptor()
				{
					PropertyName = "NodeName",
				});
			}

		}
		else
		{
			if (GroupDescriptors.Count != 0)
			{
				GroupDescriptors.Clear();
			}
		}
	}

The GroupDescriptors collection gets updated as I expected, but the list view does not respond to the new GroupDescriptor when the switch is set to on. If I add the descriptor in the XAML directly it generates the first view, so I am pretty sure the xaml and bindings are set up correctly, it just does not seem to work when I add it on the property updated.

Here is the cobbled together XAML for the prototype...


<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
             xmlns:appmodels ="clr-namespace:MauiControlLayout;assembly=MauiControlLayout"
             x:Class="MauiControlLayout.MainPage">

	<ContentPage.Resources>
		<ResourceDictionary>
			<DataTemplate x:Key="ListViewItemTemplate">
				<telerik:ListViewTemplateCell>
					<telerik:ListViewTemplateCell.View>
						<Grid  Padding="28, 0, 0, 0" BackgroundColor="White">
							<VerticalStackLayout>
								<Label Text="{Binding ControllerModel.NodeId}"  TextColor="#6F6F70" FontSize="Small" VerticalOptions="Center" />
								<Label Text="{Binding ControllerModel.ControllerId}" TextColor="#6F6F70" FontSize="Small" VerticalOptions="Center" />
							</VerticalStackLayout>
						</Grid>
					</telerik:ListViewTemplateCell.View>
				</telerik:ListViewTemplateCell>
			</DataTemplate>

			<!-- >> listview-features-header-template-xaml -->
			<DataTemplate x:Key="ListViewGroupHeaderTemplate">
				<Grid BackgroundColor="#007A53">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="Auto" />
						<ColumnDefinition />
					</Grid.ColumnDefinitions>
					<Label Text="&#x25B8;" Margin="8, 12, 0, 6" TextColor="DarkGray" FontSize="Medium">
						<Label.Triggers>
							<DataTrigger TargetType="Label" Binding="{Binding IsExpanded}" Value="True">
								<Setter Property="Text" Value="&#x25BE;" />
							</DataTrigger>
						</Label.Triggers>
					</Label>
					<Label Margin="0, 12, 0, 6" Text="{Binding Key}" Grid.Column="1" TextColor="DarkGray" FontSize="Medium" HorizontalOptions="Start" />
				</Grid>
			</DataTemplate>
			<!-- << listview-features-header-template-xaml -->
			<DataTemplate x:Key="HeaderTemplate">
				<StackLayout
				x:Name="GatewayPageHeader"
				Grid.Row="0"
				BackgroundColor="White"
				Padding="0, 0, 0, 3">
					<Grid>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
						</Grid.RowDefinitions>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="Auto"/>
							<ColumnDefinition Width="9*"/>
							<ColumnDefinition Width="1*"/>
						</Grid.ColumnDefinitions>
						<!-- Register Gateway Command -->
						<Label Grid.Column="0" Grid.Row="0" HorizontalOptions="Start" VerticalOptions="Center" Padding="2" FontSize="15" FontAttributes="Bold" Text="Available Gateways" TextColor="#007A53"/>
						<HorizontalStackLayout
							Grid.Column="0"
							Grid.ColumnSpan="3"
							Grid.Row="1"
							HorizontalOptions="StartAndExpand">
							<Label 
								x:Name="GroupByNodeIdEnabled"
								VerticalOptions="Center"
								VerticalTextAlignment="Center"
								Text="Group By Gateway"
								TextColor="#007A53" />
							<Switch x:Name="GroupByNodeIdSwitch"  Grid.Column="1" IsToggled="{Binding IsNodeIdGroupSwitchToggled}" Margin="5,0,0,0" />
						</HorizontalStackLayout>

						<!-- Settings Command -->
						<Image Grid.Row="0" Grid.Column="2" Source="plus_small_green.png" Aspect="AspectFill" WidthRequest="15" HeightRequest="15" Margin="0"/>
						<Frame Grid.Row="0" Grid.Column="2" WidthRequest="25" HeightRequest="25" BackgroundColor="Transparent" BorderColor="Transparent">
							<Frame.GestureRecognizers>
								<TapGestureRecognizer Command="{Binding AddGatewayCommand}"/>
							</Frame.GestureRecognizers>
						</Frame>
					</Grid>
				</StackLayout>
			</DataTemplate>
			<!-- << listview-features-header-template-xaml -->

		</ResourceDictionary>
	</ContentPage.Resources>
	
	
    <ScrollView
			x:Name="mainScrollView"
      BackgroundColor="#007A53">
		<Grid x:Name="mainGrid">
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto" />
				<RowDefinition Height="Auto" />
				<RowDefinition Height="*" />
			</Grid.RowDefinitions>

			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="10*" />
			</Grid.ColumnDefinitions>

			<telerik:RadListView
        x:Name="GatewayListView"  
				Grid.Row="1"
        Grid.ColumnSpan="2"
        ItemsSource="{Binding Controllers}"
        SelectedItem="{Binding SelectedController, Mode=TwoWay}"
				ItemTemplate="{StaticResource ListViewItemTemplate}"
				GroupHeaderTemplate="{StaticResource ListViewGroupHeaderTemplate}"
				HeaderTemplate="{StaticResource HeaderTemplate}" 
        IsItemSwipeEnabled="True"
        SwipeOffset="70, 0, 70, 0"
        SwipeThreshold="10"
        BackgroundColor="Transparent"
        Margin="2">
				<!--<telerik:RadListView.GroupDescriptors>
					<telerik:ListViewPropertyGroupDescriptor PropertyName="NodeName"/>
				</telerik:RadListView.GroupDescriptors>-->

			</telerik:RadListView>


		</Grid>
	</ScrollView>


</ContentPage>

Didi
Telerik team
 answered on 03 May 2024
1 answer
50 views
I've reviewed the documentation and example code, but I'm still unsure how to approach this problem. I have images stored as byte arrays in a database that I need to display in the chat interface. Alternatively, I could use URLs to access the images if that simplifies the process. How can I display these images as messages within the chat?
Didi
Telerik team
 answered on 03 May 2024
1 answer
86 views

Hi,

Why plus and minus are so big?

 


   <telerikInput:RadNumericInput x:Name="numericInputRecursEvery" Value="{Binding SelectRecursEvery , Mode=TwoWay}" Minimum="0" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" WidthRequest="200" Margin="5"/>
                    

Yana
Telerik team
 answered on 01 May 2024
0 answers
37 views

Example: Nothing selected

Selecting The Child: Parent not selected. ( results in parent selected )

Selecting the Child:Parent Selected (results in child selected)

Can the selected item in the tree go directly to the item clicked instead of selecting the parent first?

Sean
Top achievements
Rank 2
Iron
 asked on 26 Apr 2024
1 answer
68 views

Hi,

I have implemented Telerik .NET MAUI RadSideDrawer control using the following properties:

1. AreGesturesEnabled="True"

2. TapOutsideToClose="True"

3. DrawerLocation="Bottom" 

4. TouchTargetThreshold="0.0" (in order to disable user to swipe up with gesture but with a button click evenet)

5. DrawerLength="300" (I need to set the maximum DrawerHeight in order to see only few available items of a list)

 

Expected behavior

- Inside the DrawerContent I have a ScrollView with a large set of items and I need to see only a few of them.

- When the RadSideDrawer is opened, the user can have the following abilities:

1. Can close the RadSideDrawer taping outside

2. Can swipe out using control gestures

3. Can Scroll in the RadSideDrawer control's DrawerContent's custom scrollable area

 

Problematic Real Behavior

Taking into consideration the "Expected behavior" and the predefined five properties above, I can notice that:

1. In order to work properly the "TapOutsideToClose", this happens only when AreGesturesEnabled="True". With these two properties combination, I notice that the custom ScrollView is not working, so I cannot see the rest of the items in my custom list.

2. A workaround could be AreGesturesEnabled="False" and TapOutsideToClose="True". In that case I noticed that the custom Scrollable area is now working, so I can scroll in the rest of the items in my custom list, but TapOutsideToClose action now is not working, so the user cannot close the RadSideDrawer with any way (neither with TapOutside action nor with swiped out gesture).

Thanks in advance,

Thanos

 

 

Yana
Telerik team
 answered on 26 Apr 2024
1 answer
36 views

I have already tried setting the visibility of the editors to "false" (and also removing them completely), but there is still a remaining height for the group (the green part). This does not disappear even if the ContentPadding is set to 0.

Thanks.

Didi
Telerik team
 answered on 17 Apr 2024
1 answer
52 views

Hi,

There is no loading button at the moment. This is a very common component to indicate the user. 

Some basically it can have an icon (or not) by default and isLoading or isBusy property to show the loading icon instead of the icon assigned. A decision can be made to make it disabled then or not automatically. Generally it should be upto the developer to disable it as well when loading.

Didi
Telerik team
 answered on 10 Apr 2024
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?