Telerik Forums
UI for Xamarin Forum
0 answers
29 views

Hi, after updating to telerik ui for xamarin 2023.3.1010 I am experiencing crashes in radlistview ListViewUserCommand ItemTap.

In my command I find the selected object in the bound list, and i set one of its flags. The problem occurs when the set triggers the onpropertychanged event of one of those flags, and then it fully crashes the app completely

Vlad
Top achievements
Rank 1
 asked on 15 Nov 2023
1 answer
43 views
I am using a picker column in a grid for all rows. When I double-click anywhere in the rows, all the selected values refresh and ask to 'Select a bin' again.  Also, there are no click events triggered in the grid. How to solve this issue?
      <telerikDataGrid:DataGridPickerColumn PropertyName="BinName" HeaderText="Dest_Bin" CanUserEdit="False">
                                <telerikDataGrid:DataGridPickerColumn.CellContentTemplate>
                                    <DataTemplate>
                                        <StackLayout Orientation="Horizontal">
                                            <Picker x:Name="BinPicker" Title="Select a Bin" ItemsSource="{Binding Dest_BinList, Converter={StaticResource BinSiteListConverter}}" SelectedItem="{Binding BinName}" SelectedIndexChanged="SiteBinPicker_SelectedIndexChanged" TextColor="Black" TitleColor="Coral" FontSize="15" >
                                            </Picker>
                                        </StackLayout>
                                    </DataTemplate>
                                </telerikDataGrid:DataGridPickerColumn.CellContentTemplate>
                            </telerikDataGrid:DataGridPickerColumn>

Didi
Telerik team
 answered on 27 Oct 2023
4 answers
152 views

I cannot for the life of me get IsChecked to bind properly to a data source so I can't use it against a model. How is one supposed to do it? This doesn't work:

IsChecked="{Binding Selected}"

 

n/a
Top achievements
Rank 1
Iron
 updated answer on 04 Oct 2023
0 answers
70 views

I using Light and Dark themes in my app.

In each theme I set Styles for BorderStyle and RadEntry.

<telerikInput:BorderStyle x:Key="EntryBorderStyle"
                          CornerRadius="5"
                          BorderColor="{DynamicResource PrimaryColor}"
                          BorderThickness="1"/>

<Style TargetType="{x:Type telerikInput:RadEntry}">
    <Setter Property="BackgroundColor" Value="{DynamicResource EntryBackgroundColor}" />
    <Setter Property="TextColor" Value="{DynamicResource TextThemeColor}" />
    <Setter Property="BorderStyle" Value="{DynamicResource EntryBorderStyle}" />
    <Style.Triggers>
        <Trigger TargetType="telerikInput:RadEntry" Property="IsEnabled" Value="False">
            <Setter Property = "TextColor" Value="{DynamicResource DisabledTextColor}"/>
        </Trigger>
    </Style.Triggers>
</Style>

but when I use RadEntry on ContentPage, styles are not attached properly, BorderColor not work after app start.

The only way to properly working Style is to add styles to ContentPage.Resources, remove entry and add again and HotReload page.

I also check solution with adding StaticResource in App.xaml:

<Application.Resources>
    <ResourceDictionary>
        <telerikInput:BorderStyle x:Key="EntryBorderStyle"
                                CornerRadius="5"
                                BorderColor="{DynamicResource PrimaryColor}"
                                BorderThickness="1"/>

        <telerikInput:BorderStyle x:Key="EntryErrorBorderStyle"
                                CornerRadius="5"
                                BorderColor="{DynamicResource ErrorColor}"
                                BorderThickness="1" />

        <Style TargetType="telerikInput:RadEntry">
            <Setter Property="BorderStyle" Value="{StaticResource EntryBorderStyle}" />
            <Setter Property="BackgroundColor" Value="{DynamicResource EntryBackgroundColor}" />
            <Setter Property="TextColor" Value="{DynamicResource TextThemeColor}" />
            <Style.Triggers>
                <Trigger TargetType="telerikInput:RadEntry" Property="IsEnabled" Value="False">
                    <Setter Property = "TextColor" Value="{DynamicResource DisabledTextColor}"/>
                </Trigger>
            </Style.Triggers>
        </Style>
and it alos doesn't work.

 

n/a
Top achievements
Rank 1
Iron
 updated question on 21 Sep 2023
0 answers
91 views

I have a rad list and i use BindingContextChanged to change isVisible trueOrFalse based on some coditions but it returns me the list where some items have white space down and some other items the bottom margin cut the infos in half.

 

Ioannis
Top achievements
Rank 1
Iron
 asked on 26 Jul 2023
1 answer
78 views

Say I have a table with columns AA, BB, CC, DD and, via the More menu under the filtering and grouping options, I turn off the AA column and rearrange the others so that it is displayed as CC, BB, DD.

I then do:

var dataView = dataGrid.GetDataView();

var rows = dataView.Cast<DataRowView>().Select(x => x.Row).ToList();

Then if I iterate through the rows[index].ItemArray, the fields are in the original order (AA, BB, CC, DD). I can look at the RadDataGrid.Columns and see if the column IsVisible, but if I use the index in the ItemArray on the Columns, I won't get the right column.

What am I missing? It seems like the DataView should have the data in the order presented or that the Columns collection should have a way to map the ordering. After all, the DataView does present the filtering, grouping, and sorting correctly.

I wrote code to do my own mappings, but it's kind of ugly and seems unnecessary - there should be a way to either get the data in the order presented or get the columns in the order presented.

As for why I'm doing this - I'm using the DataGrid in a UWP and iPad Xamarin.Forms app to take report output and let the user's rearrange columns, filter, sort, turn off unwanted columns, etc. then export to Excel in a WYSIWYG fashion - the export should look like the current state of the DataGrid.

Ves
Telerik team
 answered on 11 Jul 2023
1 answer
98 views

Hi, I am Implementing the Bar series, I am able to draw the Bars, But I need to apply different colors to each bar. I've tried like below but no use.

        ChartPalette customPalette = chartView.Palette.ClonePalette();
            PaletteEntry barEntry = customPalette.GetEntry(ChartPalette.BarFamily);
            barEntry = customPalette.GetEntry(ChartPalette.BarFamily);
            barEntry.Fill = Color.Black;

            PaletteEntry barEntry1 = customPalette.GetEntry(ChartPalette.BarFamily);
            barEntry1= customPalette.GetEntry(ChartPalette.BarFamily);
            barEntry1.Fill = Color.Red;

            PaletteEntry barEntry2 = customPalette.GetEntry(ChartPalette.BarFamily);
            barEntry2  = customPalette.GetEntry(ChartPalette.BarFamily);
            barEntry2 .Fill = Color.Yellow;

            barSeries.CategoryBinding = new MonthResultDataBinding("Index");
            barSeries.ValueBinding = new MonthResultDataBinding("BarValue");
            barSeries.Data = (Java.Lang.IIterable)this.monthResults;
            chartView.Series.Add(barSeries);
            chartView.Palette = customPalette;

Any help on adding different color for each data point.

Lance | Manager Technical Support
Telerik team
 answered on 05 Jul 2023
1 answer
90 views

Hello,

I am encountering an issue with the RadBorder control in Xamarin.Forms on iOS devices. The RadBorder control is not rendering correctly, and its properties such as Margin and CornerRadius are not being applied on iOS. I have tested the code on Android devices, where it functions as expected.

Here is a snippet of the XAML code that demonstrates the issue:

                            <telerikDataControls:RadListView x:Name="TaskList" 
                                                             Grid.Row="1"
                                                             IsItemSwipeEnabled="True"
                                                             ItemSwipeCompleted="TaskList_ItemSwipeCompleted"
                                                             SelectionChanged="TaskList_SelectionChanged"                                                   
                                                             SelectionMode="Single" 
                                                             SelectionGesture="Tap"            
                                                             SwipeOffset="50, 0, 50, 0" 
                                                             SwipeThreshold="10"
                                                             HeightRequest="30"
                                                             RefreshRequested="TaskList_RefreshRequested"
                                                             IsPullToRefreshActive="True"
                                                             IsPullToRefreshEnabled="True"
                                                             VerticalOptions="FillAndExpand"
                                                             BackgroundColor="LightGray" >
                                <telerikDataControls:RadListView.ItemTemplate >
                                    <DataTemplate>
                                        <telerikListView:ListViewTemplateCell >
                                            <telerikListView:ListViewTemplateCell.View>
                                                <Grid >
                                                    <telerikPrimitives:RadBorder BorderColor="#268ecd" Margin="3,6" BorderThickness="0" CornerRadius="18" >
                                                        <StackLayout Orientation="Horizontal" 
                                                                 Style="{StaticResource ListItem}" 
                                                                 VerticalOptions="FillAndExpand" 
                                                                 Padding="0" 
                                                                 BackgroundColor="White">
                                                            <BoxView BackgroundColor="{Binding CriticalityColors}" WidthRequest="7" HeightRequest="10" HorizontalOptions="Start"/>
                                                            <StackLayout Orientation="Vertical" HorizontalOptions="FillAndExpand" Spacing="0" Padding="0, 15">
                                                                <StackLayout Orientation="Vertical" HorizontalOptions="StartAndExpand" Spacing="5">
                                                                    <Label Text="{Binding TaskLabel}" Style="{StaticResource ListHeader}" TextColor="{StaticResource LightBlueColor}" />
                                                                    <Label Text="{Binding TargetLabel}" Style="{StaticResource ListInfo}" TextColor="{StaticResource GreyColor}" />
                                                                </StackLayout>
                                                                <StackLayout Orientation="Horizontal" HorizontalOptions="FillAndExpand" Spacing="5">
                                                                    <Label Text="{Binding CategoryDesc}" Style="{StaticResource ListInfo}" IsVisible="True" TextColor="{StaticResource GreyColor}" Padding="0, 5" HorizontalOptions="StartAndExpand"/>
                                                                    <Label x:Name="DesComplLbl" Text="{Binding DesComplDateParenthesis}" Style="{StaticResource ListInfo}" IsVisible="False" BindingContextChanged="DesComplLbl_BindingContextChanged" HorizontalOptions="End"  Padding="0, 5"/>
                                                                </StackLayout>
                                                            </StackLayout>
                                                            <Image x:Name="statusImg" HorizontalOptions="End" Source="{Binding StatusImage}" Margin="0,0,0,10"/>
                                                        </StackLayout>
                                                    </telerikPrimitives:RadBorder>
                                                </Grid>
                                            </telerikListView:ListViewTemplateCell.View>
                                        </telerikListView:ListViewTemplateCell>
                                    </DataTemplate>
                                </telerikDataControls:RadListView.ItemTemplate>
                                <telerikDataControls:RadListView.ItemSwipeContentTemplate>

I have also provided below the Expected Output (Android) and the Incorrect Output (iOS)

Also there is an other issue for the IOS that when i Load the List for the first time the spacing behaves irregularly but after i refresh it the spacing returns to normal 

I would appreciate any guidance or assistance in resolving this problem. Please let me know if you need any additional information or code samples.

Thank you for your support.
0 answers
87 views

The RadSideDrawer Drawer content is not fully visible for Android Low resolution devices. With the below same code for iOS there is not problem for any resolutions. And correct layout & incorrect layout snapshot also attached for the issue. Please help on this.

<Grid AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0,0,1,1" Margin="0,0,0,0" Grid.Row="1">
                        <telerikPrimitives:RadSideDrawer x:Name="drawer" HeightRequest="{Binding DisplayHeight}"
                                                        DrawerLocation="Bottom"
                                                        DrawerTransitionType="SlideInOnTop"
                                                        AreGesturesEnabled="True"
                                                        BackgroundColor="Transparent"
                                                        DrawerClosing="drawerClose" >
                            <!--telerikPrimitives:RadSideDrawer.HeightRequest>
                                        <OnPlatform x:TypeArguments="Thickness"
                                            iOS="16,6"
                                            Android="16,0,16,30">
                                        </OnPlatform>
                                    </-->
                            <telerikPrimitives:RadSideDrawer.MainContent AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0,0,1,1">
                                <Grid BackgroundColor="Transparent">
                                    <Grid.Margin>
                                        <OnPlatform x:TypeArguments="Thickness"
                                            iOS="16,0,16,73"
                                            Android="16,0,16,75">
                                        </OnPlatform>
                                    </Grid.Margin>
                                    <telerikDataControls:RadListView x:Name="listView" ItemTapped="ListView_ItemTapped"
                                        ItemsSource="{Binding UserDevices, Mode=TwoWay}" NativeControlLoaded="RadListView_NativeControlLoaded"
                                        NativeControlUnloaded="RadListView_NativeControlUnloaded" BackgroundColor="Transparent"
                                        ItemTemplate="{StaticResource ListViewItemTemplate}"
                                        IsLoadOnDemandEnabled="True" LoadOnDemandMode="Automatic"
                                        GroupHeaderTemplate="{StaticResource ListViewGroupHeaderTemplate}"
                                        GroupHeaderStyle="{StaticResource ListViewGroupHeaderStyle}">

                                        <telerikDataControls:RadListView.GroupDescriptors>
                                            <telerikListView:PropertyGroupDescriptor PropertyName="CategoryText" SortOrder="Ascending"/>
                                        </telerikDataControls:RadListView.GroupDescriptors>

                                        <telerikDataControls:RadListView.LayoutDefinition>
                                            <telerikListView:ListViewGridLayout HorizontalItemSpacing="7" SpanCount="2" VerticalItemSpacing="7" ItemLength="104"/>
                                        </telerikDataControls:RadListView.LayoutDefinition>

                                        <telerikDataControls:RadListView.SelectedItemStyle>
                                            <telerikListView:ListViewItemStyle BackgroundColor="#FFE8E8E8" 
                                                                               BorderColor="#FFFFFFFF" />
                                        </telerikDataControls:RadListView.SelectedItemStyle>
                                    </telerikDataControls:RadListView>

                                    <telerikPrimitives:RadBusyIndicator x:Name="BusyIndicator"
                                                AnimationContentHeightRequest="100"
                                                AnimationContentWidthRequest="100"
                                                AnimationType="Animation9"
                                                InputTransparent="{Binding IsNotBusy}"
                                                AnimationContentColor="DarkSlateGray"
                                                IsBusy="{Binding IsBusy}" >

                                                <controls:RadBusyIndicator.Animations>
                                                <common:RadDoubleAnimation  Easing="Linear"
                                                                            PropertyPath="Rotation"
                                                                            RepeatForever="True"
                                                                            Target="{Reference Name=image}"
                                                                            From="0"
                                                                            To="360" />
                                                </controls:RadBusyIndicator.Animations>
                                                <controls:RadBusyIndicator.BusyContent>
                                                    <Image x:Name="image"
                                                            HeightRequest="200"
                                                            HorizontalOptions="Center"
                                                            VerticalOptions="Center"
                                                            WidthRequest="200">
                                                    </Image>
                                                </controls:RadBusyIndicator.BusyContent>
                                    </telerikPrimitives:RadBusyIndicator>
                                </Grid>
                            </telerikPrimitives:RadSideDrawer.MainContent>
                            <telerikPrimitives:RadSideDrawer.DrawerContent AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0,0,1,1">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="60"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <Grid.Margin>
                                        <OnPlatform x:TypeArguments="Thickness"
                                            Android="0,0,0,28">
                                            <!--iOS="0,0,0,40"-->
                                        </OnPlatform>
                                    </Grid.Margin>
                                    <StackLayout Orientation="Horizontal" BackgroundColor="#EDECE8" HorizontalOptions="FillAndExpand" Grid.Row="0"
                                                    VerticalOptions="CenterAndExpand" Opacity="0.9" Focused="drawerClose" IsTabStop="False">
                                        <StackLayout HorizontalOptions="StartAndExpand" Orientation="Horizontal" >
                                            <ImageButton x:Name="deviceIcon" Source="Blind_1.png" VerticalOptions="Center" HorizontalOptions="Center" Margin="10,10,0,10" HeightRequest="40" WidthRequest="40" Clicked="EditDevice_Clicked" BackgroundColor="Transparent"/>
                                            <StackLayout Orientation="Vertical" VerticalOptions="CenterAndExpand" HorizontalOptions="FillAndExpand">
                                                <Label x:Name="deviceName" Text="" FontAttributes="Bold" FontSize="17" TextColor="Black" Margin="0,2,0,0" LineBreakMode="NoWrap"/>
                                                <Label x:Name="deviceStatus" Text="50%" FontAttributes="None" FontSize="14" TextColor="#676767" Margin="0,-7"/>
                                                <Label x:Name="deviceRoomName" Text="" FontAttributes="None" FontSize="12" TextColor="#676767" Margin="0,0,0,0" />
                                            </StackLayout>
                                        </StackLayout>
                                        <StackLayout HorizontalOptions="EndAndExpand" TranslationX="40" x:Name="editImageButton">
                                            <Grid>

                                                <AbsoluteLayout Grid.Column="0">
                                                    <ImageButton Source="edit.png" BackgroundColor="Transparent" HorizontalOptions="EndAndExpand" VerticalOptions="CenterAndExpand" Margin="27,18,0,0"
                                                    Grid.Column="0" Grid.Row="0" Clicked="EditDevice_Clicked" WidthRequest="24" HeightRequest="24" />
                                                </AbsoluteLayout>
                                                <AbsoluteLayout Grid.Column="0">
                                                    <ImageButton CommandParameter="{Binding .}" Clicked="EditDevice_Clicked" BackgroundColor="Transparent" WidthRequest="50" HeightRequest="60" 
                                                    Grid.Column="0" Grid.Row="0" AbsoluteLayout.LayoutBounds="1,0,50,60"  AbsoluteLayout.LayoutFlags="PositionProportional" HorizontalOptions="EndAndExpand"
                                                                VerticalOptions="CenterAndExpand" Margin="0,0,0,0" />
                                                </AbsoluteLayout>
                                            </Grid>
                                        </StackLayout>
                                        <StackLayout HorizontalOptions="EndAndExpand">
                                            <Grid>
                                                <AbsoluteLayout Grid.Column="0">
                                                    <ImageButton Source="cancel.png" BackgroundColor="Transparent" HorizontalOptions="EndAndExpand" VerticalOptions="CenterAndExpand" Margin="7,18,0,0"
                                                    Grid.Column="0" Grid.Row="0" Clicked="drawerClose" WidthRequest="24" HeightRequest="24" />
                                                </AbsoluteLayout>
                                                <AbsoluteLayout Grid.Column="0">
                                                    <ImageButton CommandParameter="{Binding .}" Clicked="drawerClose" BackgroundColor="Transparent" WidthRequest="50" HeightRequest="60" 
                                                    Grid.Column="0" Grid.Row="0" AbsoluteLayout.LayoutBounds="1,0,50,60"  AbsoluteLayout.LayoutFlags="PositionProportional" HorizontalOptions="EndAndExpand"
                                                                VerticalOptions="CenterAndExpand" Margin="0,0,0,0" />
                                                </AbsoluteLayout>
                                            </Grid>
                                        </StackLayout>
                                    </StackLayout>

                                    <StackLayout x:Name="bottomSlidePanel" Margin="0,-6,0,-9" Opacity="1" BackgroundColor="White" Grid.Row="1"/>

                                    <StackLayout x:Name="slideBottomSection" Orientation="Vertical" BackgroundColor="Transparent" Grid.Row="2" Margin="0,2,0,0" VerticalOptions="EndAndExpand">
                                        <Label x:Name="lblGray" BackgroundColor="#E5E4DF" HorizontalOptions="FillAndExpand" HeightRequest="32" Opacity="0.9" />
                                        <StackLayout  x:Name="stacFavSet" Orientation="Horizontal" VerticalOptions="Center" Opacity="1" BackgroundColor="White" Margin="0,-6" HeightRequest="44">
                                            <Label Text="{translate:Translate Favorite}" TextColor="Black" FontSize="17" FontAttributes="None" VerticalOptions="CenterAndExpand" Margin="25,-6,0,-6"/>
                                            <Switch x:Name="favSet" Style="{StaticResource SwitchStyle}" Toggled="Fav_ButtonClicked"/>
                                        </StackLayout>

                                        <StackLayout Orientation="Vertical" VerticalOptions="Center" Opacity="1" BackgroundColor="White" HeightRequest="44">
                                            <Button Text="{translate:Translate Edit}" Clicked="EditDevice_Clicked" Focused="EditDevice_Clicked" Style="{StaticResource GoldButton}"/>
                                        </StackLayout>
                                    </StackLayout>
                                </Grid>
                            </telerikPrimitives:RadSideDrawer.DrawerContent>
                        </telerikPrimitives:RadSideDrawer>
                                            </Grid>

Thanks                                                         
Sujit
Top achievements
Rank 1
 asked on 29 Jun 2023
1 answer
241 views
Is there a way to set a button click effect when a user taps on the RadButton?
Didi
Telerik team
 answered on 28 Jun 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?