Hello,
we are upgrading our Telerik librairies from Q3 2010 to Q2 2011 and have noticed a problem we didn't have before.
We have Map controls placed as content of TileViewItems. When placed inside a TileViewItem, dragging the Map with the mouse is not possible anymore (outside of TileViewItem, the dragging works perfectly).
Searching the forum, we found this message: http://www.telerik.com/community/forums/silverlight/tileview/i-need-help.aspx#1766844
Using the StatusChanged event of the ItemContainerGenerator and SetAllowDrag on the container works fines for all TileViewItems in the collection (RadTileView.Items) except the last one. And when there's only one item in the collection, the proposed solution doesn't work at all.
Using the following XAML, the mouse dragging functions on Map1, but not on Map2:
Is there another way to permit the dragging of the Maps when placed inside TileViewItems?
Best regards
we are upgrading our Telerik librairies from Q3 2010 to Q2 2011 and have noticed a problem we didn't have before.
We have Map controls placed as content of TileViewItems. When placed inside a TileViewItem, dragging the Map with the mouse is not possible anymore (outside of TileViewItem, the dragging works perfectly).
<
telerik:RadTileView
x:Name
=
"TileView"
>
<
telerik:RadTileViewItem
Header
=
"Map"
>
<
telerik:RadMap
>
<
telerik:RadMap.Provider
>
<
telerik:OpenStreetMapProvider
/>
</
telerik:RadMap.Provider
>
</
telerik:RadMap
>
</
telerik:RadTileViewItem
>
</
telerik:RadTileView
>
Searching the forum, we found this message: http://www.telerik.com/community/forums/silverlight/tileview/i-need-help.aspx#1766844
public
MainPage()
{
InitializeComponent();
this
.TileView.ItemContainerGenerator.StatusChanged +=
new
EventHandler(ItemContainerGenerator_StatusChanged);
}
private
void
ItemContainerGenerator_StatusChanged(
object
sender, EventArgs e)
{
Telerik.Windows.Controls.ItemContainerGenerator containergenerator = sender
as
Telerik.Windows.Controls.ItemContainerGenerator;
if
(containergenerator !=
null
&& containergenerator.Status == Telerik.Windows.Controls.Primitives.GeneratorStatus.ContainersGenerated)
{
foreach
(var item
in
TileView.Items)
{
var container = containergenerator.ContainerFromItem(item);
if
(container !=
null
)
Telerik.Windows.DragDrop.DragDropManager.SetAllowDrag(container,
false
);
}
}
}
Using the StatusChanged event of the ItemContainerGenerator and SetAllowDrag on the container works fines for all TileViewItems in the collection (RadTileView.Items) except the last one. And when there's only one item in the collection, the proposed solution doesn't work at all.
Using the following XAML, the mouse dragging functions on Map1, but not on Map2:
<
telerik:RadTileView
x:Name
=
"TileView"
>
<
telerik:RadTileViewItem
Header
=
"Map"
x:Name
=
"Map1"
>
<
telerik:RadMap
>
<
telerik:RadMap.Provider
>
<
telerik:OpenStreetMapProvider
/>
</
telerik:RadMap.Provider
>
</
telerik:RadMap
>
</
telerik:RadTileViewItem
>
<
telerik:RadTileViewItem
Header
=
"Map"
x:Name
=
"Map2"
>
<
telerik:RadMap
>
<
telerik:RadMap.Provider
>
<
telerik:OpenStreetMapProvider
/>
</
telerik:RadMap.Provider
>
</
telerik:RadMap
>
</
telerik:RadTileViewItem
>
</
telerik:RadTileView
>
Is there another way to permit the dragging of the Maps when placed inside TileViewItems?
Best regards