Telerik Forums
UI for .NET MAUI Forum
0 answers
180 views

Hi,

There is problem with binding.


   <ContentView.BindingContext>
        <local:HistoryViewModel/>
    </ContentView.BindingContext>

<telerikInput:RadListPicker x:Name="typeListPicker" Placeholder="Select Type" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" HeightRequest="40" WidthRequest="200" Margin="5" ItemsSource="{Binding TypesItems}" DisplayMemberPath="Value" SelectedItem="{Binding Types, Mode=TwoWay}"><telerikInput:RadListPicker.ItemTemplate><DataTemplate><Label Text="{Binding Value}" HorizontalTextAlignment="Center" VerticalTextAlignment="Center"/></DataTemplate></telerikInput:RadListPicker.ItemTemplate></telerikInput:RadListPicker>


 private SchedulerTypeItem _types; 
  public HistoryViewModel()
        {
     
InitTypesItem();
}

   private void InitTypesItem()
        {
            TypesItems = new ObservableCollection<TypesItem>()

            {
              new TypesItem { Value = "Push" },
              new TypesItem { Value = "Pull" },
             };
        }

  public SchedulerTypeItem Types
        {
            get
            {
                return _types;
            }
            set
            {
                if (_types != value)
                {
                    _types = value;
                    OnPropertyChanged();
                }
            }
        }

Commad
======
if (Types != null && !string.IsNullOrEmpty(Types.Value)) // throw init innitlized exception
            {
                historyReport = new ObservableCollection<HistoryReport>(historyReport.Where(hr => hr.Type == Types.Value));
            }


 

 

Daniel
Top achievements
Rank 1
Silver
Bronze
 updated question on 16 Mar 2022
1 answer
826 views

Hi,

1. I would like to style the header of the DataGrid (background color).

2.I would like to style the row  even row in one column and odd row in other color.

Thanks,

 

Didi
Telerik team
 answered on 16 Mar 2022
0 answers
329 views

Hi,

When I replace this HorizontalStackLayout with FlexLayout all data below HorizontalStackLayout  (see screenshot 1) disappear why?

I attached 2 all the view xaml.
 <FlexLayout Direction="Column"
                AlignItems="Center"
                JustifyContent="SpaceEvenly">     

 


          <HorizontalStackLayout  Grid.Row="1" Grid.Column="0"  HorizontalOptions="Center" VerticalOptions="CenterAndExpand" >
                    <telerik:RadButton  x:Name="totalFiles"
                        WidthRequest="140"
                        HeightRequest="80"                                
                        FontSize="Micro"
                        TextColor="Black"
                        BorderWidth ="2"
                        BorderColor="Grey"
                        BackgroundColor="White"
                        Margin="15" 
                        HorizontalContentAlignment="Center"
                        Text="{Binding TotalFiles, Mode=TwoWay}"/>
                    <telerik:RadButton  x:Name="pushFiles"
                        WidthRequest="140"
                        HeightRequest="80"                                
                        FontSize="Micro"
                        TextColor="Black"
                        BorderWidth ="2"
                        BorderColor="Grey"
                        BackgroundColor="White"
                        Margin="15" 
                        HorizontalContentAlignment="Center"
                        Text="{Binding PushedFiles, Mode=TwoWay}"/>
                    <telerik:RadButton  x:Name="pulledFiles"
                        WidthRequest="140"
                        HeightRequest="80"                                
                        FontSize="Micro"
                        TextColor="Black"
                        BorderWidth ="2"
                        BorderColor="Grey"
                        BackgroundColor="White"
                        Margin="15" 
                        HorizontalContentAlignment="Center"
                        Text="{Binding PulledFiles, Mode=TwoWay}"/>
                    <telerik:RadButton  x:Name="failedFiles"
                        WidthRequest="140"
                        HeightRequest="80"                                
                        FontSize="Micro"
                        TextColor="Black"
                        BorderWidth ="2"
                        BorderColor="Grey"
                        BackgroundColor="White"
                        Margin="15" 
                        HorizontalContentAlignment="Center" 
                        Text="{Binding FailedFiles, Mode=TwoWay}"/>
                </HorizontalStackLayout>
  

Daniel
Top achievements
Rank 1
Silver
Bronze
 updated question on 16 Mar 2022
1 answer
167 views

I am investigating the use of UI for .NET Maui and am looking for a password entry control, it seems like RadEntry doesn't support the IsPassword property that I would expect. Is this a planned feature ?

 

<telerikInput:RadEntry x:Name="txtPassword" Grid.Row="2" WatermarkText="Password" />

<Entry IsPassword="True" Grid.Row="2" />

Carey
Top achievements
Rank 1
 answered on 15 Mar 2022
0 answers
210 views

Hi,

      <telerikInput:RadNumericInput x:Name="numericInputReecurEvery" Value="{Binding SelectRecursEvery , Mode=TwoWay}" Minimum="0" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"/>
                      

The value not seen.

Thanks,

Daniel
Top achievements
Rank 1
Silver
Bronze
 asked on 15 Mar 2022
1 answer
814 views

Hi,

 I want sample code of RadDataGrid with option to add a new record and delete record.

The new record template should include RadTabView.

Thanks,

 

Yana
Telerik team
 answered on 15 Mar 2022
0 answers
653 views

Hi,

I get this error.

It connected to VS preview ?

To project itself ?

To telerik controls ?

How is can be solved ?

Severity	Code	Description	Project	File	Line	Suppression State
Error	NETSDK1047	Assets file 'D:\Applications\Backups\AutomationClient\AutomationClient.MAUI\obj\project.assets.json' doesn't have a target for 'net6.0-ios/ios-arm64'. Ensure that restore has run and that you have included 'net6.0-ios' in the TargetFrameworks for your project. You may also need to include 'ios-arm64' in your project's RuntimeIdentifiers.	AutomationClient.MAUI	C:\Program Files\dotnet\sdk\6.0.200\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets	267	


Daniel
Top achievements
Rank 1
Silver
Bronze
 asked on 15 Mar 2022
1 answer
639 views

All my efforts so far generate errors outside my code.

Here is sample (EntityEntry is a struct with Name and Id properties, Entries is a list of them):

            foreach(string key in dictionary.Keys)
            {
                Entries.Add(new EntityEntry { Name = key, Id = dictionary[key] });
            }

            Grid grid = new Grid();
            Label label = new Label
            {
                FontSize = 15D,
                FontAttributes = FontAttributes.Bold,
            };
            label.SetBinding(Label.TextProperty, "Name");
            grid.Children.Add(label);
            ListViewTemplateCell lt = new ListViewTemplateCell() { View = grid};
            DataTemplate dt = new DataTemplate(() => lt.View);

            EntitiesLv = new RadListView
            {
                Background = Colors.PaleTurquoise,
                HorizontalOptions = LayoutOptions.Fill,
                IsItemsReorderEnabled = false,
                ItemTemplate = dt,
                ItemsSource = Entries,
                LayoutDefinition = new ListViewGridLayout
                {
                    HorizontalItemSpacing = 5D,
                    VerticalItemSpacing = 5D
                },
                LoadOnDemandBufferItemsCount = 5,
                LoadOnDemandMode = LoadOnDemandMode.Automatic,
                Margin = new Thickness(10, 10),
                SelectionMode = SelectionMode.Single,
                VerticalOptions = LayoutOptions.Fill,
                VerticalScrollBarVisibility = ScrollBarVisibility.Default,
            };
            EntitiesLv.GestureRecognizers.Add(new TapGestureRecognizer { Command = ListTapped, NumberOfTapsRequired = 1 });
            EntitiesLv.SelectionChanged += EntitiesLvOnSelectionChanged;

Error occurs if ItemTemplate and ItemsSource are both set, but not if just one is.

All help appreciated.

 

 

Antoan
Telerik team
 answered on 11 Mar 2022
1 answer
937 views

Hi.

 <telerik:RadButton Grid.Row="4" Grid.Column ="0" Text="Login" HorizontalOptions="CenterAndExpand" VerticalOptions="Center" Clicked="OnLoginClicked"/>

<Color x:Key="PrimaryColor">#03446a</Color>
            <Color x:Key="SecondaryColor">White</Color>

 <Style TargetType="telerik:RadButton">
                <Setter Property="TextColor" Value="{DynamicResource SecondaryColor}" />
                <Setter Property="FontFamily" Value="OpenSansRegular" />
                <Setter Property="BackgroundColor" Value="{DynamicResource PrimaryColor}" />
                <Setter Property="Padding" Value="14,10" />
             </Style>

When I open login I get this look,

When I hover it the text  become black why ?

 

Deyan
Telerik team
 answered on 11 Mar 2022
1 answer
160 views

Hi,

I want sample code that show chart that updated when new record inserted

Axis x - the number of records

Axis Y - how many records inserted in particular time

Thanks in advance,

Antoan
Telerik team
 answered on 11 Mar 2022
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?