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

Hello!

I am using a list picker and had to style it without the "Ok" button in the footer in order to match the other popups I used. However, I cant seem to figure out how to get the picker to update the selected item without calling the accept command with the ok button. I wanted to use an event to command behavior in order to call the accept command when the selection changes, but it looks like the selection changed event only fires when the accept command is called. Currently, if I tap a new item in the list, it will change the highlighted item but not the value in the display. I've attached a screen shot of my picker so you can see what it looks like without the ok button. Are there any work arounds to change the selected item and close the popup when a new item is clicked? Or is my time better served looking for a new tool to use?

Thanks!

Didi
Telerik team
 answered on 30 Jun 2023
1 answer
70 views

Does the MAUI UI Toolkit work with the MAUI MVVM Community toolkit (), specifically the RelayCommand.

I am trying to configure the ListPicker to work with a RelayCommand but its not firing.

I am using the ListPicker on Windows, Latest Visual Studio, .net and Telerik versions.

XAML

<telerik:RadListPicker x:Name="WorkflowPicker" Placeholder="Select Workfow" ItemsSource="{Binding Workflows, Mode=TwoWay}" DisplayMemberPath="Name" PickerMode="DropDown" IsLooping="False" WidthRequest="300" Margin="3" BackgroundColor="Transparent" SelectedItem="{Binding SelectedWorkflow}">
                <telerik:RadListPicker.DropDownSettings>
                    <telerik:PickerDropDownSettings AcceptCommand="{Binding OnWorkflowsPickerAcceptRelay}" CancelCommand="{Binding WorkflowsPickerCancelCommand}" />
                </telerik:RadListPicker.DropDownSettings>
                <telerik:RadListPicker.ItemTemplate>
                    <DataTemplate>
                        <Label Text="{Binding Name}" HorizontalTextAlignment="Start" VerticalTextAlignment="Center"/>
                    </DataTemplate>
                </telerik:RadListPicker.ItemTemplate>
            </telerik:RadListPicker>

Page Model

public ICommand WorkflowsPickerCancelCommand { private set; get; }

public MainPageViewModel()
{
    this.WorkflowsPickerCancelCommand = new Command(this.OnWorkflowsPickerCancel);        
}

private void OnWorkflowsPickerCancel(object obj)
{
    // This fires        
}

[RelayCommand]
private void OnWorkflowsPickerAcceptRelay(object obj)
{
    // This does not fire
}

Are there any examples using the MVVM toolkit?

Lance | Senior Manager Technical Support
Telerik team
 answered on 21 Apr 2023
1 answer
160 views

To see this, in the SDKBrowserMaui application, change PopupStyling.xaml and see that text changes are not reflected in the control.

 

For example, changing it to:

            <Style TargetType="Button" x:Key="cancelButtonStyle">
                <Setter Property="BackgroundColor" Value="Transparent"/>
                <Setter Property="Text" Value="bob"/>
                <Setter Property="TextColor" Value="#1188FF"/>
            </Style>

Still shows Cancel as the text.

Didi
Telerik team
 answered on 03 Nov 2022
1 answer
175 views

[Please ignore this same question in my other post about the hover style in the grid; putting it here to focus on this one subject]

How do I change the ListPicker to not show the dropdown button on the right side of the control? This is another change from Xamarin Forms to Maui and I don't see how to affect this.

Example from Xamarin Forms:

Same code in Maui:

Antoan
Telerik team
 answered on 22 Jun 2022
1 answer
70 views

My mobile use of RadListPicker displays as a popup (expected -- that is the default). but I never see the buttons that should be at the end of the list, which itself can be fairly long. The documented Footer Template property appears to never have been implemented -- it is not in the metadata for RadListPicker, RadPickerBase, PickerContentView, RadContentView, etc.

I would like to use Telerik's Maui SDK Demo  project to see if a workaround exists, but it only builds for Windows. In Android I get the error:

"Error NETSDK1130 Microsoft.Graphics.Canvas.winmd cannot be referenced. Referencing a Windows Metadata component directly when targeting .NET 5 or higher is not supported. For more information, see https://aka.ms/netsdk1130"

As this does not happen in the Cryptocurrency sample (which does not use a ListPicker), I assume SDK has some Windows-specific code that needs replacement.

Even so, the real need is for a GestureRecognizer in the Spinner Control, which does not currently support them. Right now I can tap all I want on an item and the Selected Event never fires. That is understandable, in a way, as documentation says selection only occurs when user "confirms" his choice. Without either a GestureRecognizer or a footer, there is no current way to do that in popup.

Didi
Telerik team
 answered on 11 Apr 2022
1 answer
271 views

Hi,

1. Why is too big ?

2.No option to scroll only by mouse.

Thanks,

Lance | Senior Manager Technical Support
Telerik team
 answered on 29 Mar 2022
1 answer
63 views

 

Hi,

Look on the Select location .

 


  <telerikInput:RadListPicker Grid.Row="0" Grid.Column="3" x:Name="routeTypeListPicker"  HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" HeightRequest="40"  WidthRequest="120" Margin="5"
                          ItemsSource="{Binding RouteTypeItems}" 
                          DisplayMemberPath="Value"
                          SelectedItem="{Binding SelectedRouteTypeItem, Mode=TwoWay}">
                    </telerikInput:RadListPicker>

Lance | Senior Manager Technical Support
Telerik team
 answered on 22 Mar 2022
1 answer
138 views

Hi,

RadListPicker - missed selected index property

Thanks,

<telerikInput:RadListPicker  x:Name="timeTypeListPicker" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" HeightRequest="35"  WidthRequest="100"
                          ItemsSource="{Binding TimeTypesItem}" 
                          DisplayMemberPath="Value" 
                          SelectedItem="{Binding SelectedTimeTypesItem, Mode=TwoWay}" >
                                    </telerikInput:RadListPicker>


Lance | Senior Manager Technical Support
Telerik team
 answered on 22 Mar 2022
1 answer
163 views

Hi,

I tried to find combo box and I found this control in your documentation

1. The is too big, how I make it smaller when it open.

2.I do not see the values inside.

3.How I center the selected value.

4.Screenshhot.


  public class ResultsItemsViewModel
    {
        public ObservableCollection<ResultsItem> ResultsItems { get; set; }
        public ResultsItemsViewModel()
        {
            this.ResultsItems = new ObservableCollection<ResultsItem>()
            
            {
              new ResultsItem { Value = "OK" },
              new ResultsItem { Value = "Failed" },
             };
        }
    }


 <HorizontalStackLayout Grid.Row="1" Grid.Column="0" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" Margin="10">
                <Label Text="Results:"/>
                <telerikInput:RadListPicker Placeholder="Select Result" HeightRequest="30"
                          ItemsSource="{Binding ResultsItems}"
                          DisplayMemberPath="Value"
                         SelectionChanged="OnResultsSelectionChanged">
                    <telerikInput:RadListPicker.BindingContext>
                        <local:ResultsItemsViewModel/>
                    </telerikInput:RadListPicker.BindingContext>
                </telerikInput:RadListPicker>
            </HorizontalStackLayout>

Yana
Telerik team
 answered on 11 Mar 2022
1 answer
199 views

Cannot run MAUI sample project in VS 2022 preview 17.2.0 preview 1.0, getting error in every  call to InitializeComponent() in xaml code behind class.

https://docs.telerik.com/devtools/maui/demos-and-sample-apps/maui-demo-app

Is there online demo sample to run in browser?

 

 

 

Antoan
Telerik team
 answered on 23 Feb 2022
Top users last month
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
MIS
Top achievements
Rank 1
Ross
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Iron
Iron
Sean
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?