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

Hi Telerik Team,

May I kindly ask you if I could use ListView control in .NET MAUI with already grouped structure data type? I guess I could flatten my object source model, but I am interested if it is possible to use below model with ListView control and grouping options?

I have a ViewModel with a property type of ObservableCollection<T> MyProperty where T defined as:
public class T : List<T1>
{
public string Name {get;set;}
public string Area {get;set;}
}
and T1 as below:
public class T1
{
public string Id {get;set;}
public string ImgURL {get;set;}
//..some other properties
}

Yana
Telerik team
 answered on 04 Jan 2024
1 answer
46 views

Currently, when using a NavigationView on smaller screens like a mobile phone you see the NavigationContent first and then through the hamburger menu you can navigate through the items and change page.

I was wondering if there is a way where we see the NavigationItems first? i.e. the NavigationItems take up the entire screen width and height and then clicking on the item navigates to that page.

Take Microsoft Teams for example. On laptops it shows something as a DockLayout with the chat on the left and then navigate to the detailed messages on the right. On a mobile phone tho, the list of chats take the entire screen width and height and clicking on them takes you to that detailed messages.

I was able to get this to work using DockLayout and some other additional code:

- Use onIdiom to get device type.

- Dynamically hide or show parts of dock layout. (for instance hide the right side of the DockLayout and then left takes up the entire space).

- Switch between a ContentView and a ContentPage depending on device and functionality.  On bigger screens with full fledged docklayout, use ContentView. On smaller screens with no docklayout functionality use ContentPage

This does the job but as you can see there are a lot of moving parts and when working on a bigger project this gets hard to manage. 

Can something of this sort be implemented out of the box using Telerik controls or is there already a way to achieve this?

Didi
Telerik team
 answered on 02 Jan 2024
1 answer
99 views
Hi
I'm new in .Net MAUI.
I want to add some high-resolution images in my app. The dimensions of the images are about 7000*4000 pixels, and they are layered on top of each other. (Layers will visible/invisible by buttons)
There is no problem on Windows platform, but when I run it on Android device or emulator, it runs very slow and laggy.
Considering that by double-clicking on the image, their scale will double or triple, if I reduce their dimensions, the final quality will decrease.
Is there a solution?
Lance | Manager Technical Support
Telerik team
 answered on 29 Dec 2023
1 answer
58 views

I have tried this sort of thing to create a button that wrap within an area (and scroll if they don't fit)


<ScrollView x:Name="scrollView" Grid.Row="1" Grid.Column="0" VerticalOptions="Fill" HorizontalOptions="Fill">
    <telerik:RadWrapLayout Orientation="Horizontal" BackgroundColor="#404040" VerticalOptions="Fill" HorizontalOptions="Fill">
        <telerik:RadItemsControl x:Name="HashTagList" ItemsSource="{Binding HashTags, Mode=TwoWay}" VerticalOptions="Fill" HorizontalOptions="Fill">
            <telerik:RadItemsControl.ItemTemplate>
                <DataTemplate>
                    <Button Text="{Binding HashTag}" Style="{StaticResource hashTagButtonStyle }" CommandParameter="{Binding HashTag}"></Button>
                </DataTemplate>
            </telerik:RadItemsControl.ItemTemplate>
        </telerik:RadItemsControl>
    </telerik:RadWrapLayout>
</ScrollView>


The buttons are only rendered in a stack, how do we render out buttons that will work like the doc example, except the buttons are added dynamically

Ideally the WrapLayout has an ItemSource and DataTemplate like an Items Control?

Am I missing something?

Some things I have tried

This gives me an exception : Layout cycle detected.  Layout could not complete.


<ScrollView x:Name="scrollView" Grid.Row="1" Grid.Column="0" VerticalOptions="Fill" HorizontalOptions="Fill">
    <telerik:RadWrapLayout Orientation="Horizontal" BackgroundColor="#404040" VerticalOptions="Fill" HorizontalOptions="Fill">
        <FlexLayout Wrap="Wrap" BindableLayout.ItemsSource="{Binding HashTags, Mode=TwoWay}" VerticalOptions="Fill" HorizontalOptions="Fill" FlowDirection="LeftToRight">
            <BindableLayout.ItemTemplate>
                <DataTemplate>
                    <Button Text="{Binding HashTag}" Style="{StaticResource hashTagButtonStyle }" CommandParameter="{Binding HashTag}" FlowDirection="LeftToRight"></Button>
                </DataTemplate>
            </BindableLayout.ItemTemplate>
        </FlexLayout>
    </telerik:RadWrapLayout>
</ScrollView>

 

This works (ie not using the WrapLayout)


<ScrollView x:Name="scrollView" Grid.Row="1" Grid.Column="0" VerticalOptions="Fill" HorizontalOptions="Fill" Padding="4, 4, 4, 4" BackgroundColor="#404040">
    <!--<telerik:RadWrapLayout Orientation="Horizontal" BackgroundColor="#404040" VerticalOptions="Fill" HorizontalOptions="Fill">-->
        <FlexLayout Wrap="Wrap" BindableLayout.ItemsSource="{Binding HashTags, Mode=TwoWay}" VerticalOptions="Fill" HorizontalOptions="Fill" FlowDirection="LeftToRight">
            <BindableLayout.ItemTemplate>
                <DataTemplate>
                    <Button Text="{Binding HashTag}" Style="{StaticResource hashTagButtonStyle }" CommandParameter="{Binding HashTag}" FlowDirection="LeftToRight"></Button>
                </DataTemplate>
            </BindableLayout.ItemTemplate>
        </FlexLayout>
    <!--</telerik:RadWrapLayout>-->
</ScrollView>

Is this control for static content only?

Martin Ivanov
Telerik team
 answered on 20 Dec 2023
1 answer
59 views

I am using the RichTextEditor in our .NET MAUI app and have the following:

  <telerik:RadRichTextEditor
      x:Name="paragraphEditor"
      Grid.Row="1"
      AutomationId="Editor"
      BorderColor="{StaticResource Primary}"
      BorderThickness="1"
      Source="{Binding Test.TestWriteupHTML}" />

public class Test: INotifyPropertyChanged
{
    private string? _testWriteupHTML;

    public string? TestWriteupHTML
    {
        get => _testWriteupHTML;
        set
        {
            if (_testWriteupHTML != value)
            {
                _testWriteupHTML = value;
                OnPropertyChanged(nameof(TestWriteupHTML));
            }
        }
    }
}

I have a method to update the TestWriteupHTMP property, while debugging I can see that it gets updated properly but on the UI the editor is not updating, any suggestions? 

Didi
Telerik team
 answered on 19 Dec 2023
0 answers
32 views

    I attempted to add a dropdown in RadListView. However, when running on an iOS device, clicking the dropdown interferes with the pull-to-refresh functionality, whereas it works fine on Android.

RadListView

 

custom dropdown popup in RadListView

custom drop-down popup

 

Jim
Top achievements
Rank 1
 asked on 18 Dec 2023
2 answers
26 views

When I want to select a word in the first line of a text in RichTextBox, then a context menu with "Cut, copy .." appears and hides

the toolbar. So I can't do any action on the selected text. How can I disable the context menu?

Rolf
Top achievements
Rank 1
Iron
Iron
Iron
 updated answer on 13 Dec 2023
1 answer
59 views
Android version works fine.
iOS version throw error when page has a Telerik Control on it and you can see error below.

Our .csproj file:
<PropertyGroup>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
            ....

          <OutputType>Exe</OutputType>
          <UseMaui>true</UseMaui>
          <SingleProject>true</SingleProject>
          <ImplicitUsings>enable</ImplicitUsings>
          <Nullable>enable</Nullable>
             ....
</PropertyGroup>



Didi
Telerik team
 answered on 13 Dec 2023
1 answer
46 views

Hello,

Even though I have set up VisualState for RadEntry as below; However, RadEntry always has a default background color of white when receiving focus (mouse click) - in WINDOWS platform, it only changes color as in the VisualState setting after moving the mouse out later. Please explain and guide how to solve the problem.


<VisualStateManager.VisualStateGroups>
    <VisualStateGroup x:Name="CommonStates">
        
        <VisualState x:Name="Normal">
            <VisualState.Setters>
                <Setter Property="BackgroundColor" Value="{AppThemeBinding Dark={StaticResource DarkMode_FrameBackground}, Light= {StaticResource LightMode_FrameBackground}}"/>
            </VisualState.Setters>
        </VisualState>

        <VisualState x:Name="PointerOver">
            <VisualState.Setters>
                <Setter Property="BackgroundColor" Value="#336699"/>
            </VisualState.Setters>
        </VisualState>

        <VisualState x:Name="Focused">
            <VisualState.Setters>
                <Setter Property="BackgroundColor" Value="#336699" />
            </VisualState.Setters>
        </VisualState>

    </VisualStateGroup>
</VisualStateManager.VisualStateGroups>

Didi
Telerik team
 answered on 07 Dec 2023
0 answers
17 views

Hi,

I am using the ListPickerButtonToolbarItem list picker with MVVM and binding to an observable property,

If I set the selected item to null (so none is selected) this doesnt seem to deselect it
Its not highlighted the same as when its selected but it is still styled differently to the other other items and looks selected when I go back to choose another item.

How do we deselect the item or style the selected item in the toolbar 
ListPickerButtonToolbarItem so at least it looks the same selected or not selected?

Mark
Top achievements
Rank 3
Iron
Iron
Iron
 updated question on 07 Dec 2023
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?