Hi:
We just downloaded the Telerik Xamarin UI controls for evaluation.
We need to know the approach to change the background color of an itemstyle based on a property in my custom object. For example, if the Amount property of our object is less than 10 dollars, we want to set the backcolor in red. If the Amount is greater than 10, we want to set it to a green backcolor.
Thanks
David
I was running fine with v2016.2.614.1. I upgraded today to 2016.2.708.1, and with that newer version, both my own application and your SDKBrowser example app generate the following error when they hit the TelerikForms.Init() line in AppDelegate.cs:
Exception has been thrown by the target of an invocation. - System.TypeInitializationException: The type initializer for Telerik.XamarinForms.DataControlsRenderer.iOS.ListView.ListViewLayoutAdapterBase 2 threw an exception. - System.MissingMethodException: Method CGSize..ctor not found.
I uninstalled the update and reinstalled the older version, and the error goes away.
The error occurred with Xamarin Forms 2.2.0.31, 2.2.0.45, and 2.3.0.107.
I have a telerik chart inside a listview. It won't center veritcally inside my Grid. If i replace it with an image it works fine. Here is the code I'm using to attempt to make the chart vertically center. I'll attach screenshots of what it looks like with the chart and with the image. This is the closest I could get it.
<
ListView
x:Name
=
"ParameterLv"
SeparatorVisibility
=
"Default"
RowHeight
=
"70"
>
<
ListView.ItemTemplate
>
<
DataTemplate
>
<
ViewCell
>
<
Grid
Padding
=
"10"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"*"
/>
<
ColumnDefinition
Width
=
"100"
/>
<
ColumnDefinition
Width
=
"75"
/>
</
Grid.ColumnDefinitions
>
<
ContentView
Grid.Row
=
"0"
Grid.Column
=
"0"
>
<
Image
Source
=
"{Binding StatusImg}"
Aspect
=
"AspectFit"
></
Image
>
</
ContentView
>
<
StackLayout
Orientation
=
"Vertical"
Grid.Row
=
"0"
Grid.Column
=
"1"
>
<
Label
Text
=
"{Binding FriendlyName}"
Style
=
"{StaticResource FriendlyNameStyle}"
LineBreakMode
=
"NoWrap"
></
Label
>
<
Label
Text
=
"{Binding TagId}"
Style
=
"{StaticResource MinorText}"
LineBreakMode
=
"NoWrap"
></
Label
>
</
StackLayout
>
<
telerik:RadCartesianChart
x:Name
=
"ParameterChart"
HeightRequest
=
"60"
Grid.Row
=
"0"
Grid.Column
=
"2"
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:DateTimeContinuousAxis
ShowLabels
=
"False"
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:NumericalAxis
ShowLabels
=
"False"
/>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:GridLineVisibility
>None</
telerik:GridLineVisibility
>
<
telerik:RadCartesianChart.Series
>
<
telerik:ScatterLineSeries
ItemsSource
=
"{Binding TrendTail}"
>
<
telerik:ScatterLineSeries.XValueBinding
>
<
telerik:PropertyNameDataPointBinding
PropertyName
=
"Timestamp"
/>
</
telerik:ScatterLineSeries.XValueBinding
>
<
telerik:ScatterLineSeries.YValueBinding
>
<
telerik:PropertyNameDataPointBinding
PropertyName
=
"Value"
/>
</
telerik:ScatterLineSeries.YValueBinding
>
</
telerik:ScatterLineSeries
>
</
telerik:RadCartesianChart.Series
>
</
telerik:RadCartesianChart
>
<
StackLayout
Orientation
=
"Vertical"
Grid.Row
=
"0"
Grid.Column
=
"3"
HorizontalOptions
=
"End"
>
<
Label
Text
=
"{Binding Value}"
Style
=
"{StaticResource ValueStyle}"
HorizontalTextAlignment
=
"Center"
LineBreakMode
=
"NoWrap"
></
Label
>
<
Label
Text
=
"{Binding Unit}"
Style
=
"{StaticResource MinorText}"
HorizontalTextAlignment
=
"Center"
LineBreakMode
=
"NoWrap"
></
Label
>
</
StackLayout
>
</
Grid
>
</
ViewCell
>
</
DataTemplate
>
</
ListView.ItemTemplate
>
</
ListView
>
Hi everyone
I need your help I added a dynamic pie chart ,
but I want to change the color of the segments.
I have followed examples but does not work .
Here my code :
private ObservableCollection<Models.CategoricalData> data1;
public ObservableCollection<Models.CategoricalData> Data1
{
get
{
return data1;
}
set
{
if (data1 == value)
{
return;
}
data1 = value;
OnPropertyChanged();
}
}
public override void OnNavigatedTo(NavigationParameters parameters)
{
LoadStatusVendingMachineCEDI();
}
private async void LoadStatusVendingMachineCEDI()
{
if (localDbService == null)
{
return;
}
var AllStatusVendingMachineCEDI = await localDbService.GetStatusVendingMachineCEDIAsync();
if (AllStatusVendingMachineCEDI != null && AllStatusVendingMachineCEDI.Any())
{
StatusVendingMachineCEDI = new ObservableCollection<StatusVendingMachineCEDI>(AllStatusVendingMachineCEDI);
Data1 = new ObservableCollection<Models.CategoricalData>();
foreach (var r in StatusVendingMachineCEDI)
{
Data1.Add(new Models.CategoricalData { Category = r.StatusName, Value = r.AmountVendingMachines });
}
}
}
and the XAMAL code:
<telerik:RadPieChart x:Name="chart">
<telerik:RadPieChart.Series>
<telerik:PieSeries ItemsSource="{Binding Data1}" ShowLabels="True">
<telerik:PieSeries.ValueBinding>
<telerik:PropertyNameDataPointBinding PropertyName="Value"/>
</telerik:PieSeries.ValueBinding>
</telerik:PieSeries>
</telerik:RadPieChart.Series>
</telerik:RadPieChart>
</Grid>
Any Sugestions??
Thanks :)
Hi,
in order to squeeze more performance for android, I want to use custom native cell and renderer,
example:
similar to this: https://github.com/xamarin/xamarin-forms-samples/tree/master/WorkingWithListviewNative/Droid/D
how this can be done on telerik's listview? a short example would be great for everyone.
Thanks!
chart.HorizontalAxis.ShowLabels = false;
chart.VerticalAxis.ShowLabels = false;
chart.HorizontalAxis.LineColor = Color.White;
chart.VerticalAxis.LineColor = Color.White;
See the attachment to see the little grey tick marks at the bottom even though the axes are set to white.
Is there a way to make the axes invisible?
Hi all, I am new in Xamarin app development. I have purchased Telerik "UI for iOS".
My question is should I purchase "UI for Xamarin" or just use "UI for iOS" to develop xamarin app?