Telerik Forums
UI for Xamarin Forum
1 answer
113 views
Hello.
Tell me how to get the items that are currently displayed on the chart after zooming and scrolling?
I use custom renderer to get native control and handle pan and zoom events using PanZoomListener, but in the handler I can only get relative offset.

here is my renderer

    class ChartPointRenderer : CartesianChartRenderer
    {
        public ChartPointRenderer(Context context) :base(context)
        {
        }
        protected override RadCartesianChartView CreateNativeControl()
        {
             Control = base.CreateNativeControl();
             return Control;
        }
        protected override void OnAttachedToWindow()
        {
            base.OnAttachedToWindow();
            var beh = Control.Behaviors.ToArray();
            for (int j = 0; j < beh.Length; j++)
            {
                if (beh[j].GetType() == typeof(Telerik.XamarinForms.ChartRenderer.Android.AndroidChartPanAndZoomBehavior))
                {
                    var zoomBehavior = (Telerik.XamarinForms.ChartRenderer.Android.AndroidChartPanAndZoomBehavior)beh[j];
                    zoomBehavior.AddPanZoomListener(new Listeners.ChartPanZoomListener());
                }
            }
        }
    }



and listener

    public class ChartPanZoomListener :Java.Lang.Object, IPanZoomListener
    {

        public IntPtr Handle => throw new NotImplementedException();

        public void OnPan(double p0, double p1)
        {
            //do something
        }

        public void OnZoom(double p0, double p1)
        {
            //do something
        }
    }
Yana
Telerik team
 answered on 20 Oct 2020
1 answer
161 views

Hi,

I am using the AutoCompleteView in a Xamarin.Forms application running on iOS. The device is set to Dark Mode however I have set SuggestionViewBackgroundColor to White, however the SuggestionView still has a black background. I am running v2020.2.624.1.

Is this corrected in a later version of the library or do I need to use another approach to set the SuggestionViewBackgroundColor?

Kind regards,

Denise

Didi
Telerik team
 answered on 15 Oct 2020
3 answers
1.0K+ views

I have a RadDatePicker: <telerikInput:RadDatePicker x:Name="MainDatePicker"></telerikInput:RadDatePicker>

I have another button on the page that i want to use to pop the date selection. I would assume like other controls, i could just do: MainDatePicker.Focus(). This returns false, and doesn't actually pop the calendar selection.

If I use a standard DatePicker, it pops the calendar selection. Any ideas?

E
Top achievements
Rank 1
 answered on 13 Oct 2020
4 answers
149 views

There is some event that is causing the calendar to change dates upon doing a Navigation.PushAsync or Navigation.PushModalAsync when set to multi-day view. From what I can determine, it has to do with swiping left or right to change the schedule date, and not displaying the next set of dates in exactly muliples of 3 from today's date. Here is an example:

Today is the 9th, I open the calendar to 3 day view, and it shows the 9th, 10th, and 11th. I click a slot that causes a view to be pushed: 

 

await Navigation.PushAsync(new AddAppointmentView(this, appt));

I can click on any slot on any of these 3 days and it works fine. The new view appears properly.

 

* However, if I swipe left to view the 10th, 11th, and 12th is where I have the issue. When I do this, the DisplayDateChanged event fires off and says the date is the 10th properly, but when I click on a timeslot for the PushAsync event, the DisplayDateChanged event fires off again and it's set to the 10/6/2020. There shouldn't have been a date change event here at all. The calendar visibly moves to the new set of days (6th, 7th, 8th) in this scenario.

 

If I were to swipe the schedule to the right 3 days so that it's viewing the 12th, 13th, and 14th, it works fine. If I use my date picker on the page to select any date, it works fine. It only seems to have to do with swiping to change the date. Almost like some internal date is not being set when swiping, and then when a view push event happens, it tells the schedule to either move forward or move backwards 3 days.

Temporarily, is there a way to disable swiping to move dates while we figure this out?

Didi
Telerik team
 answered on 12 Oct 2020
2 answers
191 views
Hello
I have a problem in using RadListPicker, I use telerik ui R3 2020.3.916.1 version for xamarin.
When I use the ListPicker the objects inside the list do not fit on ios while on android they do, for example if my item is very long it is cut and does not allow you to read it all.
The problem occurs exclusively on IOS, I noticed in the forum that some users had reported the same problem on the ListView component and that this had been solved with an update, at the moment I have updated telerik to the latest version available but the problem is not solved .
What can I do?
Thanks bye.
Federico
Top achievements
Rank 1
 answered on 12 Oct 2020
2 answers
346 views

Hi,

 

I am getting the error "String was not recognized as a valid DateTime" when I click on Custom in the recurrence screen. Am I missing a localization setting? My android device is in Pt-Br.

 

In the output windows I can see:

 

10-08 15:49:27.438 E/AppCenterCrashes(24492): Unhandled Exception from source=AndroidEnvironment
10-08 15:49:27.438 E/AppCenterCrashes(24492): System.FormatException: String was not recognized as a valid DateTime.
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at System.DateTimeParse.ParseExact (System.ReadOnlySpan`1[T] s, System.ReadOnlySpan`1[T] format, System.Globalization.DateTimeFormatInfo dtfi, System.Globalization.DateTimeStyles style) [0x00024] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/Common/src/CoreLib/System/Globalization/DateTimeParse.cs:31
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at System.DateTime.ParseExact (System.String s, System.String format, System.IFormatProvider provider) [0x00014] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/Common/src/CoreLib/System/DateTime.cs:1131
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at Telerik.XamarinForms.Input.CalendarYearlyViewPicker.DateView_PropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00040] in <8d058a9ae5d34d7aa63e24afe6fbbabc>:0
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:229
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:358
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at Telerik.XamarinForms.Input.RecurrencePeriodView.set_IsSelected (System.Boolean value) [0x00017] in <8d058a9ae5d34d7aa63e24afe6fbbabc>:0
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at Telerik.XamarinForms.Input.CalendarYearlyViewPicker.SetInitialSelectedChildren (System.Collections.ObjectModel.ObservableCollection`1[T] newValue) [0x00073] in <8d058a9ae5d34d7aa63e24afe6fbbabc>:0
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at Telerik.XamarinForms.Input.CalendarYearlyViewPicker.OnSelectedMonthsChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue) [0x00003] in <8d058a9ae5d34d7aa63e24afe6fbbabc>:0
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x00120] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:463
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x00173] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:397
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, System.Boolean fromTarget) [0x00214] in D:\a\1\s\Xamarin.Forms.Core\BindingExpression.cs:155
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at Xamarin.Forms.BindingExpression.Apply (System.Boolean fromTarget) [0x0003e] in D:\a\1\s\Xamarin.Forms.Core\BindingExpression.cs:53
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at Xamarin.Forms.BindingExpression+BindingExpressionPart.<PropertyChanged>b__49_0 () [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindingExpression.cs:742
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at Xamarin.Forms.BindingExpression+BindingExpressionPart.PropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs args) [0x000cb] in D:\a\1\s\Xamarin.Forms.Core\BindingExpression.cs:753
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at Xamarin.Forms.BindingExpression+WeakPropertyChangedProxy.OnPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00012] in D:\a\1\s\Xamarin.Forms.Core\BindingExpression.cs:646
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at Telerik.XamarinForms.Common.NotifyPropertyChangedBase.OnPropertyChanged (System.String propertyName) [0x00015] in <204e483098f14490aba225eef00b07db>:0
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at Telerik.XamarinForms.Input.Calendar.CustomRecurrenceViewModel.set_SelectedMonthsOfYear (System.Collections.ObjectModel.ObservableCollection`1[T] value) [0x00010] in <8d058a9ae5d34d7aa63e24afe6fbbabc>:0
10-08 15:49:27.438 E/AppCenterCrashes(24492):   at Telerik.Xamar

Daniel
Top achievements
Rank 1
 answered on 09 Oct 2020
5 answers
303 views

Hi, can't find anything on how to style tree view items.

Specifically I'm trying to control the indent of child items and shrink the whitespace around items. (and the gap between the expand arrow on the text)

Didi
Telerik team
 answered on 09 Oct 2020
2 answers
142 views

I posted the following to the Xamarin forums but am not getting any responses.  Note that I tried to study your real-world example apps but even they seem to be using the now outdated technology? (I also could not get them to compile...getting errors about the NuGet paths being too long even though I extracted the code to my desktop...not super worried about that now though).

................

I'm new to Xamarin and want to create a cross-platform app to replace a click-once WinForms app. I have a Sql Azure database that I want to keep using. But the components to use are beyond confusing. I need local (offline) storage of course. Is Microsoft still supporting Mobile? In what seems to be the right approach, I end up at: "app-service-mobile/app-service-mobile-value-prop" (sorry, as a first-time poster I'm not being allowed to publish the full link). At that location I see: "This content has been retired and may not be updated in the future. The product, service, or technology mentioned in this content is no longer supported." And that article was written on 6/25/2019.
So, what is "today's" approach to using an Azure back-end service (and database) + having offline (temporary) storage? I'm new to Sqlite too (but very well versed in Sql Server). Am I now facing a complete "roll my own" solution?

One note, in case it matters, I don't want to use Entity Framework. Staying low level is fine with me (Sql code, etc.).

Larry
Top achievements
Rank 1
Veteran
 answered on 05 Oct 2020
1 answer
97 views

Hello all,

I could really use some help identifying an approach/control on this problem. I'm trying to implement something like is seen in Facebook or Instagram where one can type a friend/contact name, a list of suggestions appears, and then the user can select one to insert, that selection is added and appears differently than the other text. This doesn't seem like a huge ask but I cannot find anything close to it other than some completely custom solution.

Desired text example: Here is your Suggestion that was Selected.

I would be glad to hear any suggestions. Controls to start with to add the functionality to. Keywords that I may not be aware of that are used for the functionality I'm describing. Anything would be helpful.

Thanks!
Adam.g

Lance | Senior Manager Technical Support
Telerik team
 answered on 05 Oct 2020
3 answers
323 views

Hello,

I can't check it by myself, so I ask it here :)

Yesterday I updated Visual Studio (PC) to 16.7.4, including Xamarin.IOS 14.0.0.0, and my app doesn't work anymore. Views including SideDrawer fail to load, with this exception : Object reference not set to an instance of an object (Run on physical iPhone 8 / iOS 13)

The same project, with the same but version of telerik libs, compiled last Friday with VS 16.7.2 (Xamarin.iOS 13.20.2.2) works fine. Android runs are OK too.

Does anyone else have this bug or it's on my side only ? I prefer not tu upgrade to iOS 14 on the iPhone, if possible...

 

Thank you :)

Bra
Top achievements
Rank 1
Veteran
 answered on 05 Oct 2020
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?