c# - How to group Path objects? -


i creating 'map application' in wpf, using c#. use visual blend 2 draw boundaries of countries, result got path objects (written in xaml). path object first point == last point, path closed. countries (like japan) has islands, result 1 country has more 1 path.

i trying add behaviors objects (countries - 1 or more paths), when user mouse enter country (or ismouseover property 'true' - doesn't matter here), country changing background color.

where country == 1 path, there no problem. can there more 1 path countries?

so question is: how group paths in 1 object?

i trying use geometrygroup class can't use properly...

do have ideas?

your path can have more 1 'm' no problem , works fine path.fill. depends on type of figure you're drawing.

here's sample:

<path data="m10,10 h100 v100 h-100z m30,30 h50 v50 h-50z"       stroke="gray"       strokethickness="1"       fill="blue"/> 

or geometry.parse("m10,10 h100 v100 h-100z m30,30 h50 v50 h-50z") if use code.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -