ABECON Groep BV
Top achievements
Rank 1
ABECON Groep BV
asked on 15 Mar 2010, 04:26 PM
Hello,
Im trying to load 200 items into a map control but they are over each other.
I want to change the z-index when i hover an item to get it on top.
Is there a way to do that?
Thanks for your help
Marcel de Groot
Abecon
Im trying to load 200 items into a map control but they are over each other.
I want to change the z-index when i hover an item to get it on top.
Is there a way to do that?
Thanks for your help
Marcel de Groot
Abecon
4 Answers, 1 is accepted
0
Hi Marcel,
You can use the Canvas.SetZIndex method to highlight the pin point. The following sample code uses the MouseEnter event to set z-index:
Sincerely yours,
Andrey Murzov
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.
You can use the Canvas.SetZIndex method to highlight the pin point. The following sample code uses the MouseEnter event to set z-index:
private
void
AddPinpoint(MapPinPoint pinPoint)
{
pinPoint.MouseEnter +=
this
.MapPinPoint_MouseEnter;
informationLayer.Items.Add(pinPoint);
}
private
int
lastIndex = 0;
private
void
MapPinPoint_MouseEnter(
object
sender, MouseEventArgs e)
{
UIElement element = sender
as
UIElement;
if
(element !=
null
)
{
Canvas.SetZIndex(element, ++lastIndex);
}
}
Sincerely yours,
Andrey Murzov
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
ABECON Groep BV
Top achievements
Rank 1
answered on 17 Mar 2010, 11:56 AM
Thanks for your response!
It works great!
Marcel de Groot
Abecon
It works great!
Marcel de Groot
Abecon
0
Pete
Top achievements
Rank 1
answered on 01 Jul 2011, 02:03 PM
I have the same problem but my information layers are databound (Itemsource property is bound to a collection of objects).
Is there a way to achieve this (preferably in an MVVM way)?
Thanks
Is there a way to achieve this (preferably in an MVVM way)?
Thanks
0
Hi Xamlmax,
This post is more than 1 year old. Since this post we have changed the architecture of the information layer completely. The ZIndex is attachable property of the Canvas element. The InformationLayer does not use Canvas, so ZIndex is not supported. The only way to bring some element to front of others is put it to the end of the collection which is items source for the information layer.
Greetings,
This post is more than 1 year old. Since this post we have changed the architecture of the information layer completely. The ZIndex is attachable property of the Canvas element. The InformationLayer does not use Canvas, so ZIndex is not supported. The only way to bring some element to front of others is put it to the end of the collection which is items source for the information layer.
Greetings,
Andrey Murzov
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