Telerik Forums
UI for Xamarin Forum
1 answer
123 views

Hey,

I'm getting this error when using RadSegmentedControl in UWP. the RadSegmentedControl is placing inside a TabView control. There is RadListView control within the same TabViewItem. The user navigate from a cell to new page and after returning back to the TabView and selecting a new TabItem, I'm getting the error.

 

{Telerik.XamarinForms.InputRenderer.UWP.ExtendedSegmentedItemsControl}

"   at Telerik.UI.Xaml.Controls.Input.SegmentedItemsControl.OnItemsChanged(Object e)"

"Object reference not set to an instance of an object."

 

Thanks,

Mano

Yana
Telerik team
 answered on 06 Nov 2018
3 answers
166 views

Hello,

I am now trying out Telerik's controls for my company's needs and I am running into an issue where the RadRadialGauge is not taking up the whole available horizontal space. What we need is only the top half of the gauge, which I am managing by setting the SweepAngle and StartAngle, but the gauge is showing to be way too small. I have checked via the Android Layout Inspector that the Canvas itself is taking up the whole available space. My guess is that because the Gauge is put on the first row of a Grid, it is behaving like it should be a full Gauge rather than a half Gauge and that is why it is taking up less space. I am attaching some code that is similar to what we have now:

<Grid Padding="20"
          BackgroundColor="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="2*" />
        </Grid.RowDefinitions>
        <Grid HorizontalOptions="FillAndExpand"
              VerticalOptions="FillAndExpand"
              Grid.Row="0"
              IsVisible="{Binding IsGaugeVisible}">
            <telerikGauges:RadRadialGauge x:Name="gauge"
                                          SweepAngle="180"
                                          StartAngle="180"
                                          Margin="0">
                <telerikGauges:RadRadialGauge.Axis>
                    <telerikGauges:GaugeLinearAxis Maximum="100"
                                                   Minimum="0"
                                                   Step="33"
                                                   StrokeThickness="0"
                                                   ShowLabels="False" />
                </telerikGauges:RadRadialGauge.Axis>
                <telerikGauges:RadRadialGauge.Indicators>
                    <telerikGauges:GaugeShapeIndicator Value="{Binding CurrentPercent}"
                                                       Fill="White"
                                                       Offset="35"
                                                       Position="Start" />
                </telerikGauges:RadRadialGauge.Indicators>
                <telerikGauges:RadRadialGauge.Ranges>
                    <telerikGauges:GaugeRangesDefinition StartThickness="40" EndThickness="40">
                        <telerikGauges:GaugeRange Color="{Static helpers:Constants.Squash}"
                                                  From="0"
                                                  To="{Binding FirstLimit}" />
                        <telerikGauges:GaugeRange Color="{Static helpers:Constants.BlueyGreen}"
                                                  From="{Binding FirstLimit}"
                                                  To="{Binding SecondLimit}" />
                        <telerikGauges:GaugeRange Color="{Static helpers:Constants.PaleRed}"
                                                  From="{Binding SecondLimit}"
                                                  To="100" />
                    </telerikGauges:GaugeRangesDefinition>
                </telerikGauges:RadRadialGauge.Ranges>
            </telerikGauges:RadRadialGauge>
            <StackLayout Orientation="Vertical"
                         VerticalOptions="Center"
                         HorizontalOptions="Center"
                         Spacing="0"
                         Margin="0, 0, 0, 20">
                <Label Text="{Binding CurrentPercent, StringFormat='{}{0}%'}"
                       VerticalTextAlignment="Center"
                       HorizontalTextAlignment="Center"
                       FontSize="Large"
                       Margin="0" />
                <Label HorizontalTextAlignment="Center"
                       VerticalTextAlignment="Center"
                       FontSize="Medium"
                       Text="{Binding CurrentStatus}"
                       Margin="0, 0, 0, 0" />
            </StackLayout>
        </Grid>
        <TableView Intent="Form"
                   Grid.Row="1">
            <TableRoot>
                <TableSection>
                    <ViewCell>
                        <StackLayout Orientation="Horizontal"
                                     HorizontalOptions="FillAndExpand">
                            <Image Source="name"
                                                        VerticalOptions="Center"
                                                        HorizontalOptions="Start"
                                                        WidthRequest="25"
                                                        BackgroundColor="LawnGreen" />
                        </StackLayout>
                    </ViewCell>
                </TableSection>
            </TableRoot>
        </TableView>
</Grid>
Again, out goal is for the half Gauge we have to occupy the full space that is available. The version of the controls I am using is the latest Trial version. So far I can see that if I set the Grid that contains the Gauge to have a RowSpan of 2, the Gauge appears at the center of the screen and occupies most of the width available. My problem with that approach is that I need it at the start of the screen, and setting VerticalOptions to StartAndExpand does not really help - the Gauge appears small again. I hope you will be able to help me with this as we are seriously considering buying the Xamarin UI pack if it proves possible to do what we want.

Best regards,

Konstantin

 

 

Konstantin
Top achievements
Rank 1
 answered on 06 Nov 2018
2 answers
79 views

Hi there

1. We have a fully working DataForm but have an issue with PositiveFeedback.

Basically we have a couple of enumerators that work fine but every time we load the form the PositiveFeedback is triggered and they show the green background. How do we turn this off? I cant find any resources on how to achieve this.

Same thing happens with some date controls. As we are defaulting dates on form load the positive feedback is triggered and they show the green background.

Can anyone point me in the right direction?

Thanks in advance

Geoff

 

 

Geoff
Top achievements
Rank 1
Iron
 answered on 05 Nov 2018
18 answers
234 views
UI for XAMARIN I'm trying to implement cahrt with xamarin android but reactive view host throw some exception : [ERROR] FATAL UNHANDLED EXCEPTION: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'ReactiveUI.ControlFetcherMixin' threw an exception. ---> System.ArgumentException: An item with the same key has already been added
Ian
Top achievements
Rank 1
 answered on 05 Nov 2018
3 answers
130 views

So I have a RadCartesianChart with a DateTimeContinuousAxis set as the horizontal axis and a NumericalAxis set as the vertical axis, and I'm rendering a SplineAreaSeries (I've also tried an AreaSeries). The data I'm displaying ranges about 10 days, with the smallest difference between data points at about an hour, with some gaps in the data each day for a couple hour segments. I'm letting the axis auto-adjust the intervals between ticks and labels as the data being displayed can be filtered to a date range of 1-10 days.

It seems on iOS (and possibly others), sometimes it draws an extra tick label where there is no room for that tick label. This causes in some cases a jumbled up pair of labels on the right side of the horizontal axis. In the picture shown, it's still relatively readable (not really), but in some cases it can draw two labels almost right on top of each other.

I also noticed it sometimes draws the axis labels a bit differently, even with the same data, between navigations or RadTabView tab switches.

As an aside: I'd love to have the option of just drawing the horizontal axis labels vertically instead of rotated 45% or whatever it is.

Here is the XAML markup:

 

<telerikChart:RadCartesianChart x:Name="trendChart"
                                                                HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"
                                                                BackgroundColor="Transparent"
                                                                Margin="0, 0, 0, 40">

                                    <!--<telerikChart:RadCartesianChart.ChartBehaviors>
                                        <telerikChart:ChartSelectionBehavior DataPointSelectionMode="Single" SeriesSelectionMode="None" />
                                    </telerikChart:RadCartesianChart.ChartBehaviors>-->

                                    <telerikChart:RadCartesianChart.HorizontalAxis>
                                        <telerikChart:DateTimeContinuousAxis LabelFitMode="Rotate" PlotMode="BetweenTicks" 
                                                                             MajorTickThickness="2" MajorTickBackgroundColor="White"
                                                                             LabelFormat="MM/dd HH:mm" LabelTextColor="White" ShowLabels="True" />
                                    </telerikChart:RadCartesianChart.HorizontalAxis>

                                    <telerikChart:RadCartesianChart.VerticalAxis>
                                        <telerikChart:NumericalAxis Minimum="0" LabelTextColor="White" 
                                                                    MajorTickThickness="2" MajorTickBackgroundColor="White" />
                                    </telerikChart:RadCartesianChart.VerticalAxis>

                                    <telerikChart:RadCartesianChart.Grid>
                                        <telerikChart:CartesianChartGrid MajorLinesVisibility="Y" MajorLineThickness="1" />
                                    </telerikChart:RadCartesianChart.Grid>

                                    <telerikChart:RadCartesianChart.Series>
                                        <telerikChart:SplineAreaSeries StrokeThickness="2"
                                                                       Stroke="{StaticResource TrendChartLineColor}" 
                                                                       Fill="{StaticResource TrendChartFillColor}"
                                                                       LabelBinding="Label" 
                                                                       ValueBinding="Minutes"
                                                                       CategoryBinding="Timestamp"
                                                                       ShowLabels="False"
                                                                       ItemsSource="{Binding TrendData}" />
                                    </telerikChart:RadCartesianChart.Series>

                                </telerikChart:RadCartesianChart>

 

Stefan Nenchev
Telerik team
 answered on 01 Nov 2018
1 answer
89 views
Will UI for Xamarin get Diagrams soon that can be implement for Android, iOS and UWP?
Yana
Telerik team
 answered on 01 Nov 2018
3 answers
160 views

This does not happen on Android.

RadListView is in a star-sized grid row.  In the same grid, there is an auto-sized row that contains a control who's height changes as the user interacts with the view.  The RadListView uses an item template selector, and items have different heights.

When the auto-sized row changes height, the star-sized row, which contains the RadListView, changes height.  When this occurs, the items that were visible in the RadListView scroll out of view.  The distance that the RadListView scrolls seems to increase the farther down the list the control is.  It seems that the grid is redrawing itself completely and is trying to maintain the scroll position but is calculating the position incorrectly -- maybe using some default item height instead of the actuall scroll position in pixels.

Yana
Telerik team
 answered on 01 Nov 2018
1 answer
167 views

I tried to build a code sample with RadLegend but it throws an exception. i attached my code sample 

 

{Com.Telerik.Android.Common.Exceptions.MissingLayoutPartException: Layout part with id com.companyname.TelerikChart:id/notification_background is missing from the specified layout.  at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00089] in <034d4a9852dd45bea9353cc7776c99f0>:0   at Java.Interop.JniPeerMembers+JniInstanceMethods.FinishCreateInstance (System.String constructorSignature, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0004f] in <034d4a9852dd45bea9353cc7776c99f0>:0   at Com.Telerik.Widget.Primitives.Legend.RadLegendView..ctor (Android.Content.Context p0) [0x0007a] in <3df33cbb9c2a44bbb60084f618a2993d>:0   at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&)  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <43dbbdc147f2482093d8409abb04c233>:0   --- End of managed Com.Telerik.Android.Common.Exceptions.MissingLayoutPartException stack trace ---com.telerik.android.common.exceptions.MissingLayoutPartException: Layout part with id com.companyname.TelerikChart:id/notification_background is missing from the specified layout. at com.telerik.android.common.Util.getLayoutPart(Util.java:139) at com.telerik.android.common.Util.getLayoutPart(Util.java:118) at com.telerik.widget.primitives.legend.RadLegendView.<init>(RadLegendView.java:80) at com.telerik.widget.primitives.legend.RadLegendView.<init>(RadLegendView.java:48) at md573f120baf816a4fba7033ee5f3e60d3f.MainActivity.n_onCreate(Native Method) at md573f120baf816a4fba7033ee5f3e60d3f.MainActivity.onCreate(MainActivity.java:29) at android.app.Activity.performCreate(Activity.java:7009) at android.app.Activity.performCreate(Activity.java:7000) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6494) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)}

 

Xaml code is

    <telerikChart:RadCartesianChart x:Name="chart" BackgroundColor="Transparent">
        <telerikChart:RadCartesianChart.BindingContext>
            <viewModel:CategoricalViewModel/>
        </telerikChart:RadCartesianChart.BindingContext>
        <telerikChart:RadCartesianChart.HorizontalAxis>
            <telerikChart:CategoricalAxis/>
        </telerikChart:RadCartesianChart.HorizontalAxis>
        <telerikChart:RadCartesianChart.VerticalAxis>
            <telerikChart:NumericalAxis/>
        </telerikChart:RadCartesianChart.VerticalAxis>
        <telerikChart:RadCartesianChart.Series>
            <telerikChart:LineSeries CategoryBinding="Category" ValueBinding="Value" ItemsSource="{Binding CategoricalData}" DisplayName="Speed (mph) vs Time" />
        </telerikChart:RadCartesianChart.Series>
        <telerikChart:RadCartesianChart.Grid>
            <telerikChart:CartesianChartGrid MajorLinesVisibility="XY" MajorLineThickness="1"/>
        </telerikChart:RadCartesianChart.Grid>
    </telerikChart:RadCartesianChart>
    <telerikChart:RadLegend LegendItemFontColor="White"
                            LegendItemFontSize="20"
                            LegendProvider="{x:Reference Name=chart}" />

ViewModel code is

    public class CategoricalData
    {
        public object Category { get; set; }
        public double Value { get; set; }
    }

    public class CategoricalViewModel
    {
        private static Random random = new Random();
        private static string[] categories = new string[] { "Greenings", "Perfecto", "NearBy", "Family", "Fresh" };

        public CategoricalViewModel()
        {
            this.CategoricalData = GetCategoricalData();
        }

        public ObservableCollection<CategoricalData> CategoricalData { get; set; }

        public static ObservableCollection<CategoricalData> GetCategoricalData()
        {
            var data = new ObservableCollection<CategoricalData>();
            for (int i = 0; i < categories.Length; i++)
            {
                data.Add(new CategoricalData() { Value = random.Next(50, 100), Category = categories[i] });
            }

            return data;
        }
    }

 

 

Lance | Senior Manager Technical Support
Telerik team
 answered on 31 Oct 2018
6 answers
983 views

Hello,

The keybooard that appears when entering data in a DecimalEditor doesn't show the decimal point key.

Would you help me in solving  this?

Thanks

 

Didi
Telerik team
 answered on 31 Oct 2018
3 answers
137 views

Good Day 

it looks like i am the only one testing this control  lol , i have made it to work  , i am just missing a few things. 

 

1) How do you remove a specific chat from a Chat List  ? 

2) How do you Select Chat and be show selected Chats ?

3) How do you Clear the Whole Radchat Control ?

4) How do you refresh by adding new chat item wihout the whole control flickering ?

5) i am currently using a webservice to bind the chat and its working nice. now i want to refresh it on intervals. How is that normally done without Push Notification ? (OneSignal does not always work) 

 

Thanks 

 

 

Thanks 

Lance | Senior Manager Technical Support
Telerik team
 answered on 30 Oct 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?