I have a telerikDataControls:RadListView.ItemTemplateSelector working nicely.
<
telerikDataControls:RadListView.ItemTemplateSelector
>
<
vm:TodayCellSelector
AllDayTemplate
=
"{StaticResource AllDayCellTemplate}"
InspirationTemplate
=
"{StaticResource InspirationCellTemplate}"
ErrorTemplate
=
"{StaticResource ErrorCellTemplate}"
>
The templates are in separate files like this:
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<?
xaml-comp
compile
=
"true"
?>
<
ResourceDictionary
xmlns:telerikListView
=
"clr-namespace:Telerik.XamarinForms.DataControls.ListView;assembly=Telerik.XamarinForms.DataControls"
xmlns:x
=
"http://schemas.microsoft.com/winfx/2009/xaml"
>
<
DataTemplate
x:Key
=
"ErrorCellTemplate"
>
<
telerikListView:ListViewTemplateCell
>
<
telerikListView:ListViewTemplateCell.View
>
<
Label
Text
=
"ERROR"
></
Label
>
</
telerikListView:ListViewTemplateCell.View
>
</
telerikListView:ListViewTemplateCell
>
</
DataTemplate
>
</
ResourceDictionary
>
Problem: I need to call an ICommand on the parent Page from the Cell. How do I reference the page? I tried to give the page a x:Name and try that in the Binding on the Cell, but the compiler throws an error that it can't find the Page.
The cell, if placed in the main page works fine, but the cells are huge so I want them in separate files to manage.
TappedCommand="{Binding Source={x:Reference MyPage}, Path=BindingContext.EventDetailCommand}"
Here's my code. I have attached a screenshot of the resulting chart. I have a few questions...
1. How do I remove the horizontal marks on the left axis?
2. How do I remove the spacing between each bar?
3. How do I make it always show '0' on the horizontal axis?
<
telerikChart:RadCartesianChart
PaletteName
=
"Light"
SelectionPaletteName
=
"LightSelected"
Margin
=
"10,10,10,10"
Grid.Row
=
"0"
x:Name
=
"hoursChart"
BackgroundColor
=
"White"
>
<
telerikChart:RadCartesianChart.HorizontalAxis
>
<
telerikChart:NumericalAxis
MajorStep
=
"10"
LineColor
=
"White"
MajorTickBackgroundColor
=
"White"
/>
</
telerikChart:RadCartesianChart.HorizontalAxis
>
<
telerikChart:RadCartesianChart.VerticalAxis
>
<
telerikChart:CategoricalAxis
GapLength
=
"0"
LineColor
=
"Transparent"
MajorTickThickness
=
"1"
PlotMode
=
"BetweenTicks"
LabelFitMode
=
"MultiLine"
ShowLabels
=
"False"
MajorTickBackgroundColor
=
"#A9A9A9"
/>
</
telerikChart:RadCartesianChart.VerticalAxis
>
<
telerikChart:RadCartesianChart.Series
>
<
telerikChart:BarSeries
CategoryBinding
=
"Category"
ValueBinding
=
"Value"
ItemsSource
=
"{Binding SeriesData}"
CombineMode
=
"Stack"
/>
<
telerikChart:BarSeries
CategoryBinding
=
"Category"
ValueBinding
=
"Value"
ItemsSource
=
"{Binding SecondSeriesData}"
CombineMode
=
"Stack"
/>
<
telerikChart:BarSeries
CategoryBinding
=
"Category"
ValueBinding
=
"Value"
ItemsSource
=
"{Binding ThirdSeriesData}"
CombineMode
=
"Stack"
/>
<
telerikChart:BarSeries
CategoryBinding
=
"Category"
ValueBinding
=
"Value"
ItemsSource
=
"{Binding FourthSeriesData}"
CombineMode
=
"Stack"
/>
</
telerikChart:RadCartesianChart.Series
>
<
telerikChart:RadCartesianChart.Palette
>
<
telerikChart:ChartPalette
>
<
telerikChart:ChartPalette.Entries
>
<
telerikChart:PaletteEntry
FillColor
=
"#d12f23"
StrokeColor
=
"Transparent"
/>
<
telerikChart:PaletteEntry
FillColor
=
"#eebc2c"
StrokeColor
=
"Transparent"
/>
<
telerikChart:PaletteEntry
FillColor
=
"#b1a58f"
StrokeColor
=
"Transparent"
/>
<
telerikChart:PaletteEntry
FillColor
=
"#86c4cd"
StrokeColor
=
"Transparent"
/>
</
telerikChart:ChartPalette.Entries
>
</
telerikChart:ChartPalette
>
</
telerikChart:RadCartesianChart.Palette
>
</
telerikChart:RadCartesianChart
>
Hallo,
after update Skiasharp to the last version:
when i set the Itemsource to datagrid and the column/s is null or emtpy i get this exception :
System.ArgumentNullException: Value cannot be null.
Parameter name: buffer
i rolled back to Skiasharp ver. 1.60.3 and the error is gone!
i think is a error in your Library or something please check!
Gruß
hi,
i have latest version of RadCalendar. if i change phone language to norway it should display start of week from Monday.
but it is not ! Any bug or am i missing something
I would like to change the height of the GroupHeaderTemplate to match the content that I put in it. This works in Android. For example, if I have a Grid with a HeightRequest of 70, the GroupHeaderTemplate will be a height of 70 on Android. However, for iOS the height is fixed and will never change no matter how tall or short the content is.
How can I change the height on iOS?
Hi T, I have a requirement to display a list of horizontal cards that have a shadow affect. The card is just a grid with some icons and labels. The design calls for a shadow around each card to make them look elevated. I immediately thought of RadBorder but it does not have that ability. Currently I am using 2 Frame tags but I was told that can be expensive performance wise. Has anyone achieved Shadowed bordering using Styles or maybe a renderer?
Thanks,
Brian
The XAML:
<
telerikInput:RadAutoCompleteView
x:Name
=
"radACV"
BackgroundColor
=
"White"
CornerRadius
=
"5"
HeightRequest
=
"30"
TextChanged
=
"radACV_TextChanged"
SuggestionItemSelected
=
"radACV_SuggestionItemSelected"
TextSearchPath
=
"Name"
SearchThreshold
=
"3"
SuggestMode
=
"Suggest"
CompletionMode
=
"Contains"
DisplayMode
=
"Plain"
ShowSuggestionView
=
"True"
SuggestionViewHeight
=
"200"
>
<
telerikInput:RadAutoCompleteView.LoadingTemplate
>
<
DataTemplate
>
<
StackLayout
Orientation
=
"Horizontal"
HorizontalOptions
=
"Center"
Margin
=
"0, 20, 0, 20"
>
<
Label
Text
=
"Searching ... "
FontSize
=
"16"
TextColor
=
"#8E8E93"
/>
<
telerikPrimitives:RadBusyIndicator
HeightRequest
=
"24"
WidthRequest
=
"24"
IsBusy
=
"True"
VerticalOptions
=
"Start"
AnimationContentColor
=
"Accent"
AnimationType
=
"Animation9"
>
</
telerikPrimitives:RadBusyIndicator
>
</
StackLayout
>
</
DataTemplate
>
</
telerikInput:RadAutoCompleteView.LoadingTemplate
>
</
telerikInput:RadAutoCompleteView
>
The code-behind:
private
string
currentSearchText;
private
string
previousSearchText;
private
bool
isRemoteSearchRunning;
private
bool
isSelected =
false
;
private
async
void
radACV_TextChanged(
object
sender, TextChangedEventArgs e)
{
if
(!isSelected)
{
var autoCompleteView = (RadAutoCompleteView)sender;
var vm = (DocSearchViewModel)BindingContext;
currentSearchText = e.NewTextValue ??
string
.Empty;
previousSearchText = e.OldTextValue ??
string
.Empty;
if
(currentSearchText.Length >= autoCompleteView.SearchThreshold && !isRemoteSearchRunning)
{
isRemoteSearchRunning =
true
;
if
(autoCompleteView.ItemsSource ==
null
)
//if the item source is null, get new
{
autoCompleteView.ItemsSource = await vm.LoadItems(currentSearchText);
}
else
if
(!currentSearchText.Contains(previousSearchText))
//if the new search text is not a narrowing of the previous text, get new
{
autoCompleteView.ItemsSource = await vm.LoadItems(currentSearchText);
}
isRemoteSearchRunning =
false
;
}
else
if
(e.NewTextValue.Length == 0)
{
autoCompleteView.ItemsSource =
null
;
vm.Selected =
null
;
}
else
{
autoCompleteView.ItemsSource =
null
;
}
}
else
{
isSelected =
false
;
}
}
private
void
radACV_SuggestionItemSelected(
object
sender, SuggestionItemSelectedEventArgs e)
{
var autoCompleteView = (RadAutoCompleteView)sender;
isSelected =
true
;
var selectedItem = (ItemModel)e.DataItem;
var vm = (ViewModel)BindingContext;
vm.Selected = selectedItem;
}
The ViewModel Search function:
public
async Task<List<ItemModel>> LoadItems(
string
search)
{
var items =
new
List<ItemModel>();
try
{
IsBusy =
true
;
items = await _dataService.GetItems(search);
}
catch
(Exception e)
{
ReportingService.LogAppError(e);
}
finally
{
IsBusy =
false
;
}
return
items;
}
Will AutoCompleteView be bind Text property?
When I setup View for binding Text property, then if I select item in autoComplete, Text property remains empty.
Hi, I am stuck at:
I can set the SlidingToIndex command, but I can't define the {binding} part like for the RadListview (for exemple: <telerikListViewCommands:ListViewUserCommand Id="ItemTap" Command="{Binding ItemTapCommand}" />)
Any idea?
<
telerikPrimitives:RadSlideView
x:Name
=
"slideView"
>
<
telerikPrimitives:RadSlideView.ItemsSource
>
<
x:Array
Type
=
"{x:Type ContentView}"
>
<
ContentView
>
<
telerikInput:RadCalendar
Margin
=
"50, 30"
/>
</
ContentView
>
<
ContentView
>
<
Label
HorizontalOptions
=
"Center"
VerticalOptions
=
"CenterAndExpand"
Text
=
"Other View"
TextColor
=
"Blue"
/>
</
ContentView
>
<
ContentView
>
<
Label
HorizontalOptions
=
"Center"
VerticalOptions
=
"CenterAndExpand"
Text
=
"Another View"
TextColor
=
"Red"
/>
</
ContentView
>
</
x:Array
>
</
telerikPrimitives:RadSlideView.ItemsSource
>
<
telerikPrimitives:RadSlideView.Commands
>
<
telerikSlideViewCommands:SlideViewCommand
Id
=
"SlidingToIndex"
/>
</
telerikPrimitives:RadSlideView.Commands
>
</
telerikPrimitives:RadSlideView
>