Telerik Forums
UI for Xamarin Forum
3 answers
96 views

Hello. I am using a RadCartesianChartView with CartesianGridLineAnnotations set on the Y axis. When zooming and panning the chart, the annotations get rendered below the X axis, both the labels and the strokes. I've attached 2 screenshots to demonstrate the effect. Is there a property that we can change to prevent the annotations from going below the X axis? 

 

Thank you.

Deyan
Telerik team
 answered on 03 Apr 2017
1 answer
73 views

I want to bind a command to the closed event of the sidedrawer. I added a command property "SettingsClosedCommand" to the viewmodel.
I added this namespace to the xaml:

xmlns:drawer="clr-namespace:Telerik.XamarinForms.Primitives.SideDrawer;assembly=Telerik.XamarinForms.Primitives"

And I added the 3 middle lines of code to the sidedrawer:

<telerikPrimitives:RadSideDrawer DrawerLength="180" DrawerLocation="Top" DrawerTransitionType="SlideInOnTop"  IsOpen="{Binding AreSettingsOpen, Mode=TwoWay}" >

  <telerikPrimitives:RadSideDrawer.Commands>

    <drawer:SideDrawerUserCommand Command="{Binding SettingsClosedCommand}" Id="Closed"/>

  </telerikPrimitives:RadSideDrawer.Commands>  

<telerikPrimitives:RadSideDrawer.MainContent>

etc..

When I try to compile I get this error:

SeverityCodeDescriptionProjectFileLineSuppression State ErrorObject reference not set to an instance of an object.

I found the information here. What am I missing here? Is the namespace correct because it is not mentioned in the article?

Pavel R. Pavlov
Telerik team
 answered on 03 Apr 2017
2 answers
119 views

Telerik Support,

It seems when you have an ObservableCollection set as the ItemsSource of a RadListView, the RadListView does not like when you set an item in the ObservableCollection using the index of the item.

 

ex. 

ObCollection[i] = newObject;

I get the following exception:

at Android.Runtime.JavaList.get_Item (System.Int32 index) [0x00013] in /Users/builder/data/lanes/4009/3a62f1ea/source/xamarin-android/src/Mono.Android/Android.Runtime/JavaList.cs:115
at Telerik.XamarinForms.DataControlsRenderer.Android.ListViewAdapter.UpdateCollectionCore (Telerik.XamarinForms.DataControls.RadListView sourceOwner, Com.Telerik.Widget.List.RadListView targetOwner, System.String propertyName, System.Collections.Specialized.NotifyCollectionChangedEventArgs args) [0x001bd] in <65c6ed5e8fb14b688091ad2fdaa0480e>:0
at Telerik.XamarinForms.Common.FacadeAdapterBase`2[S,T].UpdateCollection (System.Object sourceOwner, System.Object targetOwner, System.String propertyName, System.Collections.Specialized.NotifyCollectionChangedEventArgs args) [0x00000] in <b09df7d4d5e74454b9482f9e64875b96>:0
at Telerik.XamarinForms.Common.XamarinToNativeControlExtensions.UpdateCollection[T,K] (T nativeElement, K xfЕlement, System.String propertyName, System.Collections.Specialized.NotifyCollectionChangedEventArgs args) [0x00028] in <b09df7d4d5e74454b9482f9e64875b96>:0
at Telerik.XamarinForms.DataControlsRenderer.Android.ListViewRenderer.ItemsSource_CollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00011] in <65c6ed5e8fb14b688091ad2fdaa0480e>:0
at Telerik.XamarinForms.DataControls.RadListView.OnItemsSourceCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0000a] in <f0d98fc8921f4f449b0a58a0baeb50d3>:0
at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00012] in /Users/builder/data/lanes/4009/3a62f1ea/source/mono/mcs/class/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:288
at AlertPSS.Data.APSSObservableItemCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00000] in <433f2a6adeaf4b85b51b3da650694a41>:0
at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Object oldItem, System.Object newItem, System.Int32 index) [0x00000] in /Users/builder/data/lanes/4009/3a62f1ea/source/mono/mcs/class/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:367
at System.Collections.ObjectModel.ObservableCollection`1[T].SetItem (System.Int32 index, T item) [0x00021] in /Users/builder/data/lanes/4009/3a62f1ea/source/mono/mcs/class/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:233
at System.Collections.ObjectModel.Collection`1[T].set_Item (System.Int32 index, T value) [0x00034] in /Users/builder/data/lanes/4009/3a62f1ea/source/mono/mcs/class/referencesource/mscorlib/system/collections/objectmodel/collection.cs:57
at AlertPSS.Transcend.AsyncReturns.AddFilteredIncident (AlertPSS.Client.Client.ClientInc inc, System.Boolean isUpdate, System.Boolean isInitial, System.Boolean isPulldown) [0x0060c] in C:\Users\kgrub\Documents\Visual Studio 2015\Projects\AlertPSS.Transcend\AlertPSS.Transcend\AsyncReturns.cs:1693
at AlertPSS.Transcend.AsyncReturns+<>c__DisplayClass30_0.<ProcessIncidentUpdate>b__0 () [0x0075a] in C:\Users\kgrub\Documents\Visual Studio 2015\Projects\AlertPSS.Transcend\AlertPSS.Transcend\AsyncReturns.cs:1269

 

This convention is used in WPF/Silverlight to keep a bound collection control ordered correctly instead of removing the item and re-adding it.  Should I not be doing it this way in Xamarin?

 

Please let me know if you need any further information, I am using Telerik For Xamarin 2017 R1 (2017.1.10120.233).

 

Thanks!

intellitechcorporation
Top achievements
Rank 1
 answered on 31 Mar 2017
1 answer
95 views

Our customer woud like to have normal ListView items with black text on a white background, and selected items with white text on a green background.

I can't see a way of setting the TextColor for the SelectedItemStyle. Is this possible? If not, is there another way of achieving this?

Pavel R. Pavlov
Telerik team
 answered on 30 Mar 2017
3 answers
138 views

Hi,

i am showing a RadCartesianChartView with a DateTimeContinuousAxis for OX and a LinearAxis for OY. The OX is showing shorter or longer spans of time, depending on the user's choice.

1. Zoom

I want to set the chart zoom level from the moment i display the chart, but also allow the user to manually zoom and pan. I tried to use Chart.SetZoom() and also add ChartPanAndZoomBehavior(), but it doesn't work. If i set the Zoom factor, the user cannot manually pan and zoom. I also tried ChartPanAndZoomBehavior.SetZoomToChart() but has no effect.

2. Setting DateTimeContinuousAxis MajorStep

When the user selects a smaller time interval (like 1 month), i want the OX axis to show days, but not all 30 days. So i set the MajorStepUnit to TimeInterval.Day and the MajorStep to 10. However, it doesn't work as expected - i see a tick for every 5 days. Worse, when the user manually zooms on the chart, the tick interval is automatically changed. I can obtain a better result by setting the horizontalAxis.MaximumTicks, but i get other side effects. What can i do to have more control over the labels that are displayed in the OX axis?

 

Thank you!

 

Nikolay
Telerik team
 answered on 30 Mar 2017
5 answers
112 views
Is it possible to assign event of property? I want, when I select editor, to load new View.
Rosy Topchiyska
Telerik team
 answered on 29 Mar 2017
3 answers
345 views

I am using the mvvm pattern and would like to bind the SideDrawer "IsOpen" property.

I have created a boolean property that raises property changed event and bind to it. With a button I change this property to the opposite value. Initially I set it to true and when the screen opens the sidedrawer is visible like expected. When I hit the button the bound property is changed but it has no effect on the visibility of the sidedrawer? Also when I close the drawer by sliding it down It does not change the bound property? I would expect that it changes to false when I do this.

What am I missing here? Is "IsOpen" a bindable property?

vm (using freshmvvm):

public bool SettingsVisible

{     

    get     

       {         

           return _settingsVisible;     

       }     

      set    

     {        

         _settingsVisible = value;

        RaisePropertyChanged("SettingsVisible");

    }

}

 

SettingsCommand = new Command(SettingsHit); //bound to button command to show/hide sidedrawer

public void SettingsHit() {     SettingsVisible = !SettingsVisible; }

 

xaml:

  <telerikPrimitives:RadSideDrawer x:Name="drawer" DrawerLength="200" DrawerLocation="Bottom" DrawerTransitionType="SlideInOnTop"                                   DrawerTransitionFadeOpacity="0.5" IsOpen="{Binding SettingsVisible}">    

<telerikPrimitives:RadSideDrawer.MainContent> 

etc....

 

Michel
Top achievements
Rank 1
 answered on 28 Mar 2017
2 answers
103 views

Hello,

How can I format the entered/showed  numbers in DecimalEditor.

Thanks

Encarnación
Top achievements
Rank 1
 answered on 28 Mar 2017
1 answer
89 views

Hello to everybody. 

I don't know if you are experiencing any problems with the installer...

I'm using VS 2017 with the latest update. The problem is that when I try to install this version, it says that it's necessary to install Visual Studio with Xamarin Extensions first. It's really annoying...

Anyone has this problem? Thanks to everyone. 

Lance | Senior Manager Technical Support
Telerik team
 answered on 27 Mar 2017
3 answers
387 views

Hi,

in our Xamarin-Forms Project, I use a Telerik ListView (LinearLayout) with swiping. For some cells, i want to disable swiping. In your manual [1] i read, that by setting the Cancel-property of the ItemSwipeStartingEventArgs to false in the StartSwiping-Event:

public void OnItemSwipeStarting(object sender, ItemSwipeStartingEventArgs e)

{

    var swipedItem = e.Item as OurItem;

   if (swipedItem.HasACertainProperty == true)

   {

        // For some items, we want to "disable" the swiping

         e.Cancel = false;    

    }

}

This does not work, but when i set e.Cancel to true, then

in iOS - swiping is disabled as expected.

in Android - we get a NullPointerException: (Java.Lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Rect.height()' on a null object reference)

in UWP - the CellContent disapears and never comes back again :'-(

 

The question is: is it possible to "disable" swiping for some cells in the Telerik ListView? If the answer is yes, how could I do this?

 

Thank you very much in advance.

All the best,

Ivo

 

[1] http://docs.telerik.com/devtools/xamarin/controls/listview/gestures/listview-gestures-cell-swipe

Ivo
Top achievements
Rank 1
 answered on 27 Mar 2017
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?