Similar to the post here, I am looking to next a control instead a RadTileView content template. I can get the RadTreeListView grid headers to appear, but I can't get the grid to databind to a collections object. Eventually, I will need this to bind to dynamic data, but for now I am just working on a proof on concept. (I'll actually want to display in the large content template, but that's another issue.) My xaml is:
In my code behind, I am trying to bind the data as follows:
I get the error that "RadTreeListView is not a member of 'TileView.MainPage'." (Where TileVIew is the name of my project and MainPage the name of my file.) If you could point me in the right direction, I would appreciate it.
<
UserControl
x:Class
=
"TileView.MainPage"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable
=
"d"
d:DesignHeight
=
"500"
d:DesignWidth
=
"800"
>
<
UserControl.Resources
>
<
DataTemplate
x:Key
=
"MDSHeaderTemplate"
>
<
TextBlock
Text
=
"{Binding ModelCode}"
></
TextBlock
>
</
DataTemplate
>
<
DataTemplate
x:Key
=
"MDSTemplate"
>
<
telerik:RadFluidContentControl
ContentChangeMode
=
"Manual"
State
=
"{Binding ModelCode}"
>
<
telerik:RadFluidContentControl.SmallContent
>
<
Grid
>
<
telerik:RadTreeListView
x:Name
=
"RadTreeListView"
HierarchyColumnIndex
=
"1"
ItemsSource
=
"{Binding}"
>
<
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:TreeListViewTableDefinition
ItemsSource
=
"{Binding ModelCode}"
>
</
telerik:TreeListViewTableDefinition
>
</
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:RadTreeListView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding ModelName}"
Header
=
"Model Name"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding TailNumber}"
Header
=
"Tail Number"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Mods}"
Header
=
"Mods"
/>
</
telerik:RadTreeListView.Columns
>
</
telerik:RadTreeListView
>
</
Grid
>
</
telerik:RadFluidContentControl.SmallContent
>
<
telerik:RadFluidContentControl.Content
>
<
Grid
>
<
TextBlock
Text
=
"This is the content"
></
TextBlock
>
</
Grid
>
</
telerik:RadFluidContentControl.Content
>
<
telerik:RadFluidContentControl.LargeContent
>
<
Grid
>
<
TextBlock
Text
=
"This is the large content"
></
TextBlock
>
</
Grid
>
</
telerik:RadFluidContentControl.LargeContent
>
</
telerik:RadFluidContentControl
>
</
DataTemplate
>
<
Style
TargetType
=
"telerik:RadTileView"
>
<
Setter
Property
=
"ContentTemplate"
Value
=
"{StaticResource MDSTemplate}"
></
Setter
>
<
Setter
Property
=
"ItemTemplate"
Value
=
"{StaticResource MDSHeaderTemplate}"
></
Setter
>
</
Style
>
</
UserControl.Resources
>
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"White"
>
<
telerik:RadTileView
HorizontalAlignment
=
"Left"
x:Name
=
"RadTileView"
VerticalAlignment
=
"Top"
Height
=
"500"
Width
=
"800"
MinimizedItemsPosition
=
"Right"
ItemsSource
=
"{Binding}"
MaximizeMode
=
"One"
>
</
telerik:RadTileView
>
</
Grid
>
</
UserControl
>
In my code behind, I am trying to bind the data as follows:
Public Sub New()
InitializeComponent()
Me.RadTileView.ItemsSource = MDS_Service.GetMDS()
Me.RadTreeListView.ItemsSource = MDS_Service.GetMDS()
End Sub
I get the error that "RadTreeListView is not a member of 'TileView.MainPage'." (Where TileVIew is the name of my project and MainPage the name of my file.) If you could point me in the right direction, I would appreciate it.