As shown in the attached image, I would like to add some customizations to the appointment in the schedule component of the Calendar (what shows up in Day/Week view)
Ideally i'd like to add something like a contentview or viewcell with whatever I like in there? Is this possible. If not what options do I have?
I am trying to set the ItemSource for a chart in a Task method, like this:
Task ShowData()
{
return Task.Factory.StartNew(() => {
// do calculations here...
LineSeries1.ItemsSource = _chartLines;
}
}
However, when run, I get the following exception: Unhandled Exception: Java.Util.ConcurrentModificationException
When I change this to a normal void method it works fine. Any pointers as to how to fix this?
My Telerik.Xamarin.Android.Chart dll is v4.0.30319.
Hi,
I have a datagrid which has an "Actions" column containing two actions(Edit and Delete) bound to radbuttons. I'm wondering how to get the row data when I click either of these 2 buttons.
XAML:
<telerikGrid:DataGridTemplateColumn HeaderText="Actions">
<telerikGrid:DataGridTemplateColumn.CellContentTemplate>
<DataTemplate>
<StackLayout>
<Grid BackgroundColor="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<telerikInput:RadButton
Grid.Row="0" Grid.Column="0" HeightRequest="40" Text="Edit" Margin="0, 2, 0, 0"
VerticalOptions="StartAndExpand" HorizontalOptions="Center"
BackgroundColor="CornflowerBlue" TextColor="White" Clicked="editRow"/>
<telerikInput:RadButton
Grid.Row="0" Grid.Column="1" HeightRequest="40" Text="Delete" Margin="0, 2, 0, 0"
VerticalOptions="StartAndExpand" HorizontalOptions="Center"
BackgroundColor="Red" TextColor="White" Clicked="deleteRow"/>
</Grid>
</StackLayout>
</DataTemplate>
</telerikGrid:DataGridTemplateColumn.CellContentTemplate>
</telerikGrid:DataGridTemplateColumn>
C#
private void editRow(object sender, EventArgs e)
{
//implementing logic based on which row's button is clicked
}
private void deleteRow(object sender, EventArgs e)
{
//implementing logic based on which row's button is clicked
}
Hello every Teleriker :)
Does anyone managed to set the ViewMode on a RadCalendar on Android with a custom renderer that get the good ViewMode value ?
I set the ViewMode when the RadCalendar NativeControlLoaded event is triggered.
((RadCalendar)sender).TrySetViewMode(CalendarViewMode.Week);
In the code behind of my page, the ViewMode seems to bet set.
But in the CalendarCustomRenderer, e.NewElement.ViewMode always return Month (I'm expecting a Week value).
I would like to add it's working great on iOS (I can cast the Control.Presenter to a TKCalendarWeekPresenter without error).
I've created this custom render because I want to hide the title of the calendar in ViewMode Week.
(again, it's working as expected on iOS).
Is it a known issue (if it is so, should I create a ticket for that ?) or am I missing something ?
I have attached a screenshot of my breackpoint with the wrong value.
I wish a good day to everyone who red this post.
i am using "ListViewTemplateCell" for my item template, i need to have rounded border around selected listview item
<
telerikDataControls:RadListView.SelectedItemStyle
>
<
telerikListView:ListViewItemStyle
BackgroundColor
=
"Gray"
BorderColor
=
"Green"
BorderWidth
=
"4"
BorderLocation
=
"All"
/>
</
telerikDataControls:RadListView.SelectedItemStyle
>
1) how to do it ?
2) can renderers do it ?
i need answer for both iOS and android
A RadCheckbox with IsEnabled="false" is not visible on UWP Xamarin forms app:
<telerikPrimitives:RadCheckBox HorizontalOptions="StartAndExpand" IsEnabled="false" IsChecked="{Binding Exam.OpticianExamComplete}" Grid.Row="0" Grid.Column="2" VerticalOptions="Center" />
Hi, I have a problem when using BusyIndicator. I mark the following error when I want to change its status to false
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:telerikInput="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:ONControl_Mobile.CUST.VinculoCultural"
xmlns:telerikInputDataForm="clr-namespace:Telerik.XamarinForms.Input.DataForm;assembly=Telerik.XamarinForms.Input"
xmlns:telerikPrimitives="clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives"
x:Class="ONControl_Mobile.CUST.VinculoCultural.VCPA_AutorizacionContratoDetail"
BackgroundColor="White">
<telerikPrimitives:RadBusyIndicator x:Name="BusyIndicator"
AnimationContentHeightRequest="150"
AnimationContentWidthRequest="150"
AnimationType="Animation3"
AnimationContentColor="#4E6F99">
<telerikPrimitives:RadBusyIndicator.BusyContent>
<Label Text="Cargando..." HorizontalOptions="Center" HorizontalTextAlignment="Center"/>
</telerikPrimitives:RadBusyIndicator.BusyContent>
<telerikPrimitives:RadBusyIndicator.Content>
<ScrollView>
<AbsoluteLayout HorizontalOptions="FillAndExpand" BackgroundColor="White">
<StackLayout Padding="5,5,5,10">
<!--<ScrollView>-->
<Grid VerticalOptions="Start">
<Grid.RowDefinitions>
<RowDefinition Height="18" />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*" />
<ColumnDefinition Width="5*" />
</Grid.ColumnDefinitions>
<Label x:Name="LB_Folio" Text="Folio:" Grid.Row="0" Grid.Column="0" HorizontalOptions="FillAndExpand" Font="12" TextColor="Black" FontAttributes="Bold" Margin="5,0,0,0"/>
<Label x:Name="LB_Fecha" Text="Fecha:" Grid.Row="0" Grid.Column="1" HorizontalOptions="End" Font="12" TextColor="Black" FontAttributes="Bold" Margin="0,0,5,0"/>
<telerikInput:RadEntry x:Name="TB_ClienteDescripcion"
TextColor="Black"
FontSize="19"
Text="Cliente"
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
HorizontalOptions="FillAndExpand"
VerticalTextAlignment="Center"
Opacity="70"
BorderStyle="{StaticResource EntryBorderStyle}"
IsEnabled="False"/>
</Grid>
<!-- Se pinta Dataform-->
<telerikInput:RadDataForm x:Name="RDF_Contrato"
Margin="5,5,0,0"
ValidationMode="Manual">
<telerikInput:RadDataForm.Source>
<local:VCPA_ContratoSource />
</telerikInput:RadDataForm.Source>
<telerikInput:RadDataForm.GroupHeaderStyle>
<telerikInputDataForm:DataFormGroupHeaderStyle Background="Gainsboro" Foreground="Black" Height="55" Padding="10" TextAlignment="Center" />
</telerikInput:RadDataForm.GroupHeaderStyle>
</telerikInput:RadDataForm>
<!--Spinner-->
<Label Text="Seleccionar Estado" FontSize="12" TextColor="#424242" FontAttributes="Bold" Font="Arial"></Label>
<Picker x:Name="P_Estado"
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="2"
HorizontalOptions="FillAndExpand"
FontSize="Small"
VerticalOptions="Start"
TextColor="Gainsboro"
SelectedIndexChanged="P_Estado_SelectedIndexChanged"/>
<Label Text="Seleccionar Ciudad" FontSize="12" TextColor="#424242" FontAttributes="Bold" Font="Arial"></Label>
<Picker x:Name="P_Ciudad"
Grid.Row="3"
Grid.Column="0"
Grid.ColumnSpan="2"
HorizontalOptions="FillAndExpand"
FontSize="Small"
VerticalOptions="Start"
TextColor="Gainsboro"
SelectedIndexChanged="P_Ciudad_SelectedIndexChanged"/>
<!--Grabar Documento-->
<telerikInput:RadButton x:Name="B_Autorizar"
Text="Autorizar Contrato"
Clicked="B_Autorizar_Clicked"
FontSize="12"
TextColor="Black"/>
<!--</ScrollView>-->
</StackLayout>
</AbsoluteLayout>
</ScrollView>
</telerikPrimitives:RadBusyIndicator.Content>
</telerikPrimitives:RadBusyIndicator>
</ContentPage>
radDataGrid.Columns[0].ActualWidth
I am facing an issue regarding Xamarin Telerik
RadCartesianChart, While zooming with setting the GapLength="0.9"
MajorTickInterval="30",
No new labels created or rendered to the chart as predicted,
it works normally for android but on iOS it does nothing just zooming without
rendering the hidden labels as happened at the Android platform,
Kindly advice if there are any other attribute should be set
to make this functionality work
ViewModel Code
01.
using
System.Collections.ObjectModel;
02.
using
System.Windows.Input;
03.
using
Prism.Navigation;
04.
using
Xamarin.Forms;
05.
06.
namespace
Demo.ViewModels
07.
{
08.
public
class
CategoricalData
09.
{
10.
public
object
Category {
get
;
set
; }
11.
12.
public
double
Value {
get
;
set
; }
13.
}
14.
public
class
ChartPageViewModel : BaseViewModel
15.
{
16.
private
ObservableCollection<CategoricalData> _data;
17.
18.
public
ObservableCollection<CategoricalData> Data
19.
{
20.
get
=> _data;
21.
set
22.
{
23.
//_data = value;
24.
SetProperty(
ref
_data, value);
25.
RaisePropertyChanged(nameof(Data));
26.
}
27.
}
28.
public
ChartPageViewModel()
29.
{
30.
LoadDummyData();
31.
}
32.
33.
public
void
LoadDummyData()
34.
{
35.
var dData =
new
ObservableCollection<CategoricalData>();
36.
for
(
int
i = 0; i < 300; i++)
37.
{
38.
dData.Add(
new
CategoricalData { Category = i, Value = (i%10 > 0)?( (i%2>0)? (i%30):(i%20)): 5 });
39.
}
40.
41.
Data = dData;
42.
}
43.
44.
45.
}
46.
}
Xaml Code
01.
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
02.
<
ContentPage
xmlns
=
"http://xamarin.com/schemas/2014/forms"
03.
xmlns:x
=
"http://schemas.microsoft.com/winfx/2009/xaml"
04.
xmlns:prism
=
"clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
05.
xmlns:chart
=
"clr-namespace:Telerik.XamarinForms.Chart;assembly=Telerik.XamarinForms.Chart"
06.
prism:ViewModelLocator.AutowireViewModel
=
"True"
BackgroundColor
=
"{StaticResource BackgroundColor}"
07.
x:Class
=
"Demo.Views.ChartPage"
>
08.
09.
10.
<
chart:RadCartesianChart
x:Name
=
"chart"
BackgroundColor
=
"Transparent"
Grid.Row
=
"1"
>
11.
<
chart:RadCartesianChart.ChartBehaviors
>
12.
<
chart:ChartPanAndZoomBehavior
ZoomMode
=
"Horizontal"
PanMode
=
"Horizontal"
/>
13.
</
chart:RadCartesianChart.ChartBehaviors
>
14.
<
chart:RadCartesianChart.HorizontalAxis
>
15.
<
OnPlatform
x:TypeArguments
=
"chart:CartesianAxis"
>
16.
<
On
Platform
=
"Android"
>
17.
<
chart:CategoricalAxis
LineColor
=
"#A9A9A9"
MajorTickThickness
=
"2"
PlotMode
=
"BetweenTicks"
LabelFitMode
=
"None"
18.
MajorTickBackgroundColor
=
"#A9A9A9"
GapLength
=
"0.9"
MajorTickInterval
=
"50"
LabelTextColor
=
"White"
ShowLabels
=
"True"
/>
19.
</
On
>
20.
<
On
Platform
=
"iOS"
>
21.
<
chart:CategoricalAxis
LineColor
=
"#A9A9A9"
MajorTickThickness
=
"2"
PlotMode
=
"BetweenTicks"
LabelFitMode
=
"None"
22.
MajorTickBackgroundColor
=
"#A9A9A9"
GapLength
=
"0.9"
MajorTickInterval
=
"30"
LabelTextColor
=
"White"
ShowLabels
=
"True"
/>
23.
</
On
>
24.
</
OnPlatform
>
25.
</
chart:RadCartesianChart.HorizontalAxis
>
26.
<
chart:RadCartesianChart.VerticalAxis
>
27.
<
chart:NumericalAxis
LabelTextColor
=
"White"
ShowLabels
=
"True"
Minimum
=
"0"
Maximum
=
"80"
LineColor
=
"#A9A9A9"
MajorTickBackgroundColor
=
"#A9A9A9"
/>
28.
</
chart:RadCartesianChart.VerticalAxis
>
29.
<
chart:RadCartesianChart.Series
>
30.
<
chart:LineSeries
CategoryBinding
=
"Category"
ValueBinding
=
"Value"
ItemsSource
=
"{Binding Data}"
/>
31.
</
chart:RadCartesianChart.Series
>
32.
<
chart:RadCartesianChart.Grid
>
33.
<
chart:CartesianChartGrid
MajorLinesVisibility
=
"XY"
MajorLineThickness
=
"1"
/>
34.
</
chart:RadCartesianChart.Grid
>
35.
36.
</
chart:RadCartesianChart
>
37.
38.
</
ContentPage
>
Development Environment: