Telerik Forums
UI for Xamarin Forum
3 answers
107 views

 SelectedDate is not "highlighted" on iOS, when changing iOS *Calendar.Locale*

I'm using this solution - https://www.telerik.com/forums/calendar-does-not-change-first-day-of-week-according-to-current-culture#ZjdzTjeeFUaB-Ky7BAgirA - to set *RadCalendar* locale to current devide locale (maily to have different week starting day).
Changing of *Locale* itself working fine.

However it gives side effect, which is - *SelectedDate* is not "highlighted" on iOS, on initializing *RadCalendar*.

I found workaround for that, which is to set *SelectedDate = null* and then revert it back:

protected override void OnAppearing()
{
    // TODO - Temporary workaround for Telerik issue at iOS - *SelectedDate* is not setting selection in UI, for Appearing of Calendar (setting/changing date works fine)
    // Workaround is to fill temporary *DateTime* object with *SelectedDate*, then setting *null* to *SelectedDate*, and then restoring original date back on *SelectedDate* (SIC!)
    if (Device.RuntimePlatform == Device.iOS && Calendar.SelectedDate != null)
    {
        var cachedDateTime = Calendar.SelectedDate.Value;
        Calendar.SelectedDate = null;
        Calendar.SelectedDate = cachedDateTime;
    }
 
    base.OnAppearing();
}


It's working, but I would like to avoid such crappy workarounds.

App without setting *Locale* OR with setting *Locale* + above workaround:
- attached *rc1.png*

App with setting *Locale* + without above workaround:
- attached *rc2.png*

I'm also attaching simple reproducable project, with latest Telerik DLL release + latest XF nuget release:
- https://mega.nz/#!TZQxlJpD!1ORXQe7CFLXP7osu7vmWk_mmFgVlGQsOqZ2pED4teiI

Namysław
Top achievements
Rank 1
 answered on 12 Mar 2018
7 answers
223 views

I have the following code:

    public class TestPage : ContentPage     {
        public TestPage () {
            var calendar = new RadCalendar () {  };
            calendar.SelectionChanged += async (object sender, Telerik.XamarinForms.Common.ValueChangedEventArgs<object> e) =>     {
                var selectedDate = e.NewValue as DateTime?;
                var culture = new CultureInfo("en-AU");
                var title = string.Format("Options for {0}",selectedDate.Value.Date.ToString("d",culture));
                var result = await this.DisplayActionSheet(title , "Cancel", null, "Option 1", "Option 2");
            };
            Content = calendar;
            Title = "Test";
        }
    }

When I select a date on the calendar, the correct date is shown on the ActionSheet title on Android platform. On iOS platform, the date shown is the previous date.

Is this a bug or am I doing something wrong? I need to display the selected date on my ActionSheet.

 

Thanks.

Yana
Telerik team
 answered on 12 Mar 2018
1 answer
324 views

Hi Team,

I need a sample in Xamarin.Forms (ListView)  like 5 different templates. That are heavy loaded weighted contents like 
Template 1 - print 5 images with binding context each time randomly select the images.

Template 2 -  labels1, labels2, labels3, labels4, labels5

Other 3 templates combination of this. In the view First templates cover the first view. That are items are more than 10. When I perform scrolling then only next template in the view. And the templates repeated in the view. Over all items count is more than 500. If have any KB links about this sample then send me the links quickly.

Thanks,

Yana
Telerik team
 answered on 12 Mar 2018
5 answers
246 views

I have a situation where the user can select different sources to show in a line graph. Depended on the source I want to show one, two or three line series in the graph. So I added three line series to my graph. In case I don't need all series I set the ItemsSource of the not used serie(s) to null but this gives issue in iOS. Also the legend of the not used series is always shown. There don't seem to be some IsVisible or IsEnabled property I can bind to so the the serie is ignored while redering. 

I guess I could add or remove series to the Series collection in code behind but since I am using MVVM I really would not like to do that.

How can I solve this issue in a mvvm way? Can we use some data template selector?

 

Regards,

Michel

Yana
Telerik team
 answered on 08 Mar 2018
10 answers
261 views

The ChartPanAndZoomBehavior is a really nice feature that lets the user zoom and pan once zoomed in. There is one disadvantage, and that is that you are limited to current items source.

I am showing data over time so when you are zoomed out you can not zoom out further then the original items source. Also you cannot pan right or left when zoomed out. I would like to be able disable this behavior and adjust the items source depending on the gesture so you can pan en zoom without limits. How can I achieve this behavior preferably in a MVVM way?

 

Best regards,

Michel Moorlag

Michel
Top achievements
Rank 1
 answered on 07 Mar 2018
5 answers
397 views

I have a listview same as styling example http://https//docs.telerik.com/devtools/xamarin/controls/listview/features/listview-features-styling

But i need to change selected item background color to white and Text color to something else(let's say Red).

Background color changed but not Text color. What am i doing wrong or any fix for this ?

<telerikDataControls:RadListView.SelectedItemStyle>
                              <telerikListView:ListViewItemStyle TextCellTextColor="Red" BackgroundColor="White" 
                                                                 BorderWidth="0"
                                                                 BorderLocation="None"/>                            </telerikDataControls:RadListView.SelectedItemStyle>
Stefan Nenchev
Telerik team
 answered on 06 Mar 2018
2 answers
127 views

Hi there!

I am using the RadButton in an UWP app with Xamarin Forms.

The title should be left aligned and he button should have a padding.

In Debug Mode, everything looks fine but in release mode both padding and alignment are ignored. (See screenshots attached)

This is my code in a clean Telerik template:

<StackLayout Spacing="5" Padding="0,20,0,0" BackgroundColor="LightGray">
        <telerikInput:RadButton Text="Left Aligned With Padding" HorizontalContentAlignment="Start" Padding="20" BackgroundColor="White" />
        <telerikInput:RadButton Text="Left Aligned With Padding" HorizontalContentAlignment="Start" Padding="20" BackgroundColor="White" />
        <telerikInput:RadButton Text="Left Aligned With Padding" HorizontalContentAlignment="Start" Padding="20" BackgroundColor="White" />
    </StackLayout>
Daniel
Top achievements
Rank 1
 answered on 06 Mar 2018
1 answer
90 views
I looked at the possibilities of the RadCalendar and it looks great.
But there is one point that is important to me, but I have not found an opportunity to apply it.

The CalendarViewMode.Day displays the time from 01:00 till 00:00
Is it possible in Radcalendar to limit time in CalendarViewMode.Day? (for example from 08:00 till 18:00 o'clock)
Stefan Nenchev
Telerik team
 answered on 05 Mar 2018
1 answer
107 views

Hi, I have a chart inside a Scrollview that wasn't scrolling. Based on this thread https://www.telerik.com/forums/tkchart-in-a-uiscrollview-can't-scroll I decided to look into a gesturerecognizer. However, the example shows how to select a point. What I would like is to turn on a tooltip. I have the behavior turned on but can't seem to manually turn on the tooltip itself. The tooltip works fine if I allow the LongPressGesture to resolve normally so that is not the issue. I just need to manually turn it on it seems.

This code seems to select the point, assuming I set the selection mode properly.

private void HandleTap(UITapGestureRecognizer tap)
{
    var touchPoint = tap.LocationInView(Control.PlotView);  // Control is TKChart
    var hitTestInfo = Control.HitTestForPoint(touchPoint);
    Control.Select(hitTestInfo);
}

 

How can I turn on the tooltip for that point as if they'd tapped it?

Thank you,

Bryce

 

Tsvyatko
Telerik team
 answered on 05 Mar 2018
1 answer
354 views

Hi Team,

How can I achieve RadTabView Dynamically In Xamarin forms

If I am going to created One Tabview then that Tabview  will be used as dynamic , and I m going to pass array or list for that One tabbed

that time it will increase  TabView pages

Please help.

Lance | Senior Manager Technical Support
Telerik team
 answered on 01 Mar 2018
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?