Hi Roshan,
You can bind the visibility of the "expanded" section of your
ListViewTemplateCell to a property on the bound model. Then, by toggling the value of that bool, the area will be appear to expand.
Here's a simple example:
<
telerikDataControls:RadListView
x:Name
=
"listView"
ItemsSource
=
"{Binding Source}"
SelectionMode
=
"None"
ItemTapped
=
"ListView_OnItemTapped"
>
<
telerikDataControls:RadListView.ItemTemplate
>
<
DataTemplate
>
<
listView:ListViewTemplateCell
>
<
listView:ListViewTemplateCell.View
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
StackLayout
Orientation
=
"Horizontal"
Margin
=
"10, 10, 10, 0"
>
<
Label
Text
=
"{Binding Title}"
FontSize
=
"16"
FontAttributes
=
"Bold"
TextColor
=
"Black"
VerticalOptions
=
"Center"
/>
</
StackLayout
>
<
StackLayout
IsVisible
=
"{Binding ShowDetails}"
Orientation
=
"Horizontal"
Grid.Row
=
"1"
Margin
=
"10, 0, 10, 10"
>
<
Label
Text
=
"by"
FontSize
=
"13"
FontAttributes
=
"Italic"
TextColor
=
"Gray"
/>
<
Label
Text
=
"{Binding Author}"
FontSize
=
"13"
FontAttributes
=
"Italic"
TextColor
=
"Gray"
/>
</
StackLayout
>
</
Grid
>
</
listView:ListViewTemplateCell.View
>
</
listView:ListViewTemplateCell
>
</
DataTemplate
>
</
telerikDataControls:RadListView.ItemTemplate
>
</
telerikDataControls:RadListView
>
Then in the
ListView_OnItemTapped event handler, toggle the ShowDetails value:
Just make sure you're model has
PropertyChanged wired up, or the binding won't be notified of the changed value:
If you have any implementation-specific rpoblems, you can
open a support ticket here and attach your project so we can investigate directly.
Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items