Telerik Forums
UI for Xamarin Forum
1 answer
89 views

I using styling validation on form by DataTrigger.
When Validator.IsValid == false then DataTrigger changes specified feature.

In case of standard RadEntry control, I could specify BorderColor.

But how to work with RadNumericinput when such control not exposes any input element property?

<telerikInput:RadNumericInput x:Name="numericInput" 
                                          IsEnabled="{Binding IsEnabled}"
                                          Value="{Binding Value,Mode=TwoWay}"
                                          VerticalOptions="Center" 
                                          HorizontalOptions="FillAndExpand">
                <telerikInput:RadNumericInput.Triggers>
                    <DataTrigger TargetType="telerikInput:RadNumericInput"
                                 Binding="{Binding Validator.IsValid}"
                                 Value="False">
                        <Setter Property="BorderStyle">
                            <telerikInput:BorderStyle BorderColor="{DynamicResource ErrorColor}" />
                        </Setter>
                    </DataTrigger>
                </telerikInput:RadNumericInput.Triggers>
            </telerikInput:RadNumericInput>


Didi
Telerik team
 updated answer on 28 Dec 2022
1 answer
224 views

I using LightTheme and DarkTheme in app.
But I have a problem with +/- buttons CornerRadius and Entry border styling.
They are not react to specified style.

How to style buttons and entry to custom apperance without override whole control template?

Documentation is too poor in this context.

Here is my xaml:

<telerikInput:RadNumericInput x:Name="numericInput" 
                              IsEnabled="{Binding IsEnabled}"
                              Value="{Binding Value,Mode=TwoWay}"
                              VerticalOptions="Center" 
                              HorizontalOptions="FillAndExpand">
            </telerikInput:RadNumericInput>

And syles:

<Style TargetType="{x:Type telerikInput:RadNumericInput}">
        <Setter Property="BackgroundColor" Value="{DynamicResource EntryBackgroundColor}" />
    </Style>

    <Style TargetType="{x:Type telerikNumericInput:NumericInputButton}">
        <Setter Property="BorderRadius" Value="5" />
        <Setter Property="BorderColor" Value="{DynamicResource PrimaryColor}"/>
        <Setter Property="TextColor" Value="{DynamicResource TextThemeColor}"/>
        <Setter Property="BackgroundColor" Value="{DynamicResource EntryBackgroundColor}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Padding" Value="0,0,0,0"/>
    </Style>
    
    <Style TargetType="{x:Type telerikNumericInput:NumericInputEntry}">
        <Setter Property="TextColor" Value="{DynamicResource TextThemeColor}"/>
        <Setter Property="Padding" Value="0,0,0,0"/>
        <Setter Property="Keyboard" Value="Numeric"/>
        <Setter Property="BorderStyle">
            <Setter.Value>
                <telerikInput:BorderStyle>
                    <telerikInput:BorderStyle.BorderThickness>
                        <OnPlatform x:TypeArguments="Thickness" Default="1">
                            <On Platform="Android" Value="1"/>
                            <On Platform="iOS" Value="1"/>
                            <On Platform="UWP" Value="1"/>
                        </OnPlatform>
                    </telerikInput:BorderStyle.BorderThickness>
                </telerikInput:BorderStyle>
            </Setter.Value>
        </Setter>
    </Style>


 

Didi
Telerik team
 answered on 28 Dec 2022
1 answer
111 views
I was wondering if it was possible to edit the colors and font of the DayItemFormat of AgendaViewSettings? I have been searching for a solution for a while but can't find any.
Didi
Telerik team
 answered on 21 Dec 2022
0 answers
117 views

Getting following exception while creating TKChart control. This is applicable for all Telerik controls. When i deploy Examples.sln file then its working fine but when i create simple sample with chart getting this issue

Thanks,

Dhanasekar

dhana
Top achievements
Rank 1
 updated question on 13 Dec 2022
1 answer
147 views

This was working fine in a Xamarin Forms (UWP) project

        public void PrintReferralReport(byte[] pdf)
        {
            pdfCurrent = pdf;
            this.pdfViewer.Source = pdf;
            memberReferralPopUpVM.IsPDFGridVisible = true;

        }

<telerikPdfViewer:RadPdfViewer x:Name="pdfViewer" Grid.Row="1"/>

As soon as Telerik.Documents.Core was added to a different project (doesn't even have to be used), the viewer stopped appearing.

<PackageReference Include="Telerik.Documents.Core" Version="2022.3.1108" />

<PackageReference Include="Telerik.UI.for.Xamarin" Version="2022.3.1109.1" />
Didi
Telerik team
 updated answer on 21 Nov 2022
1 answer
440 views

Hello Support,

We are using RadListView and RadDataGrid controls in our UWP and iOS applications. On these controls we observed there is a lag when we scroll fast, this lag is with the control's default scroll  Please see attached video (UWP_without_scrollview.mp4 and iOS_without_scrollview.mp4) for our UWP and iOS applications, you will see the white space when scrolling very fast.   

Further, we tried adding Xamarin's ScrollView over the RadListView and RadDataGrid controls, with this we do not see the lag when scrolling fast (see attached video UWP_with_scrollview.mp4 and iOS_with_scrollview.mp4).

In the documention for the RadListView and RadDataGrid controls, (refernce https://docs.telerik.com/devtools/xamarin/controls/listview/listview-getting-started#:~:text=Telerik.XamarinForms.DataControls%22-,WARNING,-%3A%20RadListView%20control%20provides), it is mentioned that if we add Scrollview to these controls, it would have issue withe the UI Virtulization or Gesture Mechanism. Kindly let us know if can continue using Xamarian ScrollView with the RadListView and RadDataGrid controls?

Also please let us know if there is any other way to get around the lagging issue with using the the RadListView and RadDataGrid default Scroll.

Didi
Telerik team
 answered on 14 Nov 2022
0 answers
399 views

Hi,

We are sometimes getting the following crash on Android after the user has closed a RadPopup. It does not happen every time so it looks like it is a timing issue. We have gotten the latest Telerik release and it is still happening in that version.

Below is the stack trace.

Regards

Anthony

System.ObjectDisposedException  Message=Cannot access a disposed object. Object name: 'Android.Widget.PopupWindow'.

0x29 in Java.Interop.JniPeerMembers.AssertSelf at /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.cs:153,5
0x1 in Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod at /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:57,5
0x12 in Android.Widget.PopupWindow.Dismiss at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-29/mcw/Android.Widget.PopupWindow.cs:1635,5
0xD in Telerik.XamarinForms.Primitives.RadPopup.DismissPopupWindow
0x12 in Telerik.XamarinForms.Primitives.RadPopup.SetPopupIsOpen
0x3A in Telerik.XamarinForms.Primitives.RadPopup.UpdatePopup
0x36 in Telerik.XamarinForms.Primitives.PopupBase.Animation_ProgressChanged
0x12 in Telerik.XamarinForms.Common.RadDoubleAnimation.OnProgressChanged
0x2C in Telerik.XamarinForms.Common.RadDoubleAnimation.OnAnimationTick
0x3 in Telerik.XamarinForms.Common.RadAnimation.Telerik.XamarinForms.Common.Animations.IDoubleAnimationListener.OnAnimationTick
0x42 in Telerik.XamarinForms.Common.Animations.AnimationTask.NotifyTick
0x53 in Telerik.XamarinForms.Common.Animations.AnimationTask.Tick
0x1B in Telerik.XamarinForms.Common.Animations.AnimationManager.HandleAnimationsTick
0x0 in Telerik.XamarinForms.Common.Animations.AnimationManager.TickAnimations
0x0 in Telerik.XamarinForms.Common.Animations.AnimationManager.TickAnimationsFunc
0x6 in Xamarin.Forms.Forms.AndroidPlatformServices. at D:\a\1\s\Xamarin.Forms.Platform.Android\Forms.cs:893,6
0xE in Java.Lang.Thread.RunnableImplementor.Run at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:36,6
0x8 in Java.Lang.IRunnableInvoker.n_Run at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-29/mcw/Java.Lang.IRunnable.cs:84,4
0x8 in Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:22,5

Anthony
Top achievements
Rank 1
Iron
Veteran
 asked on 09 Nov 2022
1 answer
337 views

I want to perform some operation when the RadComboBox, RadTimePicker and RadDatePicker is focused or tapped. But even if I attach these events, they are not triggered.

Is there a way to do so. Kindly help.

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

I am working on Xamarin UWP project and have used the following code mentioned below for calendar cell styling. I am not able to change text color of specific dates in other month, it always display other month dates as gray,  can you please provide me a solution.


private CalendarCellStyle EvaluateCellStyle(CalendarCell cell)
{
    Color background = default(Color);
    Color selectedCellForegroundColor = default(Color);
    Color todayBorderColor = Color.FromRgb(115, 174, 239);
    double dayNamesFontSize = default(double);
    double fontSize = default(double);
    Thickness todayBorderThickness = default(Thickness);

    switch (Device.RuntimePlatform)
    {
        case "iOS":
            background = Color.White;
            selectedCellForegroundColor = Color.White;
            fontSize = 14;
            dayNamesFontSize = 14;
            todayBorderThickness = new Thickness(2);
            break;
        case "Android":
            background = Color.White;
            selectedCellForegroundColor = Color.FromHex("FF0066CC");
            fontSize = 15;
            dayNamesFontSize = 15;
            todayBorderThickness = new Thickness(1);
            break;
        case "UWP":
            background = Color.FromRgb(30, 30, 30);
            selectedCellForegroundColor = Color.White;
            fontSize = 17;
            dayNamesFontSize = 17;
            todayBorderThickness = new Thickness(2);
            break;
    }

    if (cell.Type == CalendarCellType.DayName)
    {
        return new CalendarCellStyle
        {
            BackgroundColor = Color.LightGray,
            FontSize = dayNamesFontSize,
            FontAttributes = FontAttributes.Bold,
            TextColor = Color.FromRgb(0, 122, 255)
        };
    }

    var defaultStyle = new CalendarCellStyle
    {
        BackgroundColor = background,
        FontSize = fontSize,
        FontAttributes = FontAttributes.None,
        TextColor = Color.FromRgb(139, 209, 0)
    };

    if (cell is CalendarDayCell dayCell)
    {
        if (dayCell.IsFromCurrentMonth)
        {
            if (dayCell.IsToday)
            {
                defaultStyle.TextColor = Color.FromRgb(0, 122, 255);
                defaultStyle.FontAttributes = FontAttributes.Bold;
                defaultStyle.BorderColor = todayBorderColor;
                defaultStyle.BorderThickness = todayBorderThickness;
            }
        }
        else
        {
            if (dayCell.IsToday)
            {
                defaultStyle.TextColor = todayBorderColor;
                defaultStyle.BorderColor = todayBorderColor;
                defaultStyle.BorderThickness = todayBorderThickness;
            }
            else
            {
                
                  if (dayCell.Date.DayOfWeek == DayOfWeek.Sunday || dayCell.Date.DayOfWeek == DayOfWeek.Saturday)
                  {
                           defaultStyle.TextColor = Color.Red;
                  }
                  else
                  {
                           defaultStyle.TextColor = Color.Gray;
                  }

            }
        }

        if (dayCell.IsSelected)
        {
            defaultStyle.TextColor = selectedCellForegroundColor;
            defaultStyle.BorderColor = Color.FromHex("FF0066CC");
        }

        return defaultStyle;
    }

    return null; // default style
}

Didi
Telerik team
 answered on 31 Oct 2022
1 answer
199 views

We’re seeing layout issues with RadListView on iOS 16 resulting in unexpected space and padding in the list.

iOS 15 and below is unaffected. Screenshots below. The issue appears to resolve on a subsequent measure/layout, it just shows on the initial layout.

Repro’d using latest Telerik for Xamarin release.

Didi
Telerik team
 answered on 14 Oct 2022
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?