3 Answers, 1 is accepted
0
Accepted
Hello vinay uthappa,
What exactly do you mean by adding user controls to the RadTileView, because you should be able to add them like any other item with something like this:
For further references could you please examine the attached project and if you have more questions feel free to ask.
Best wishes,
Zarko
the Telerik team
What exactly do you mean by adding user controls to the RadTileView, because you should be able to add them like any other item with something like this:
for
(
int
i = 0; i < 100; i++)
{
this
.myItems.Add(
new
MyUserControl());
}
this
.myTileView.ItemsSource =
this
.myItems;
Best wishes,
Zarko
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0

Vinay
Top achievements
Rank 1
answered on 02 Jun 2011, 09:25 AM
Hi,
Thanks for the Reply... I have a collection of UserControls.
I want the collection of UserControls to be Binded onto TileView.
And also i dont want the TileViewItemHeader at all.. Because the Header is already specified in the UserControl.
Here is how i am going now...
But here tileView1.ItemsSource = incidentItemList does not take the UserControl Collection properly.
And also UserControlProperties is a properties class,
And here is my XAML Page,
Thanks for the Reply... I have a collection of UserControls.
I want the collection of UserControls to be Binded onto TileView.
And also i dont want the TileViewItemHeader at all.. Because the Header is already specified in the UserControl.
Here is how i am going now...
Public
Sub
New
()
Try
InitializeComponent()
Dim
MedicalIdentityReports
As
New
ReportsLauncher(ReportLauncherElements.WebPartNames.MedicalIdentityRprt)
Dim
ActivityReports
As
New
ReportsLauncher(ReportLauncherElements.WebPartNames.SAMReportActivity)
'Dim ExceptionReports As New ReportsLauncher(ReportLauncherElements.WebPartNames.ExceptionReports)
Dim
DictionaryReports
As
New
ReportsLauncher(ReportLauncherElements.WebPartNames.DictionaryEditActivity)
Dim
CareTakerReports
As
New
ReportsLauncher(ReportLauncherElements.WebPartNames.Caretaker)
Dim
DialUpREports
As
New
ReportsLauncher(ReportLauncherElements.WebPartNames.DialUpActivity)
RadDragAndDropManager.AddDragQueryHandler(lstControlView,
AddressOf
OnDragQuery)
RadDragAndDropManager.AddDragInfoHandler(lstControlView,
AddressOf
OnDragInfo)
RadDragAndDropManager.AddDropQueryHandler(lstControlView,
AddressOf
OnDropQuery)
RadDragAndDropManager.AddDropInfoHandler(lstControlView,
AddressOf
OnDropInfo)
RadDragAndDropManager.AddDropQueryHandler(tileView1,
AddressOf
OnDropQuery)
RadDragAndDropManager.AddDropInfoHandler(tileView1,
AddressOf
OnDropInfo)
Dim
incidentItemList
As
New
List(Of UserControlProperties) From {
New
UserControlProperties
With
{.UserControlCollection = MedicalIdentityReports, .UserControlName =
"Medical Identity Reports"
},
New
UserControlProperties
With
{.UserControlCollection = ActivityReports, .UserControlName =
"Activity Reports"
},
New
UserControlProperties
With
{.UserControlCollection = DictionaryReports, .UserControlName =
"Dictionary Edit Reports"
},
New
UserControlProperties
With
{.UserControlCollection = CareTakerReports, .UserControlName =
"CareTaker Reports"
},
New
UserControlProperties
With
{.UserControlCollection = DialUpREports, .UserControlName =
"Dial Up Reports"
}
}
tileView1.ItemsSource = incidentItemList
lstControlView.ItemsSource = incidentItemList
'lstControlView.DisplayMemberPath = "UserControlName"
'listBox1.ItemsSource = incidentItemList
Catch
ex
As
Exception
Dim
ex1
As
String
= ex.Message
End
Try
End
Sub
And also UserControlProperties is a properties class,
Public
Class
UserControlProperties
Public
UserControlCollection
As
UserControl
Public
UserControlName
As
String
End
Class
And here is my XAML Page,
<
UserControl
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
x:Class
=
"Iatric.SAM.DashBoard.Reports"
xmlns:telerikNavigation
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
xmlns:dragDrop
=
"clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls"
mc:Ignorable
=
"d"
d:DesignHeight
=
"300"
d:DesignWidth
=
"625"
>
<
Grid
x:Name
=
"LayoutRoot"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"500"
></
RowDefinition
>
<
RowDefinition
Height
=
"200"
></
RowDefinition
>
</
Grid.RowDefinitions
>
<
telerikNavigation:RadTileView
x:Name
=
"tileView1"
Grid.Column
=
"0"
dragDrop:RadDragAndDropManager.AllowDrop
=
"True"
>
</
telerikNavigation:RadTileView
>
<
ListBox
VerticalAlignment
=
"Top"
Grid.Column
=
"1"
x:Name
=
"lstControlView"
BorderBrush
=
"Brown"
BorderThickness
=
"1"
dragDrop:RadDragAndDropManager.AllowDrag
=
"True"
dragDrop:RadDragAndDropManager.AllowDrop
=
"True"
Height
=
"103"
>
<
ListBox.ItemTemplate
>
<
DataTemplate
>
<
TextBlock
x:Name
=
"txtItemName"
Text
=
"{Binding UserControlName}"
></
TextBlock
>
</
DataTemplate
>
</
ListBox.ItemTemplate
>
</
ListBox
>
</
Grid
>
</
UserControl
>
0
Hi vinay uthappa,
What exactly do you mean by " i dont want the TileViewItemHeader at all"? Do want to keep the Maximize/Minimize button and the ability to drag the RadTileViewItems or you want to remove them all? In any case you'll have to update the default RadTileViewItem template to achieve this( in the attached project I've removed the header and left the Maximize/Minimize button and the drag and drop ability, you can remove them by deleting the StackPanel which is in the Border with name "outerContainer").
And also what exactly do you mean by "does not take the UserControl Collection properly" ? Is the collection wrong or there's something wron with the display of it?
Could you please examine the attached project and see if it helps you and if have more questions feel free to ask.
Best wishes,
Zarko
the Telerik team
What exactly do you mean by " i dont want the TileViewItemHeader at all"? Do want to keep the Maximize/Minimize button and the ability to drag the RadTileViewItems or you want to remove them all? In any case you'll have to update the default RadTileViewItem template to achieve this( in the attached project I've removed the header and left the Maximize/Minimize button and the drag and drop ability, you can remove them by deleting the StackPanel which is in the Border with name "outerContainer").
And also what exactly do you mean by "does not take the UserControl Collection properly" ? Is the collection wrong or there's something wron with the display of it?
Could you please examine the attached project and see if it helps you and if have more questions feel free to ask.
Best wishes,
Zarko
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items