I am creating some “map application” in WPF using C #. I use Visual Blend 2 to draw the borders of countries, so as a result I got Path objects (written in XAML). A path is an object where the first point == the last point, so the path is always closed. Some countries (for example, Japan) have some islands, therefore, as a result, one country has more than 1 path.
I am trying to add some types of behavior to these objects (countries are one or several paths), for example, when a user mouse enters a country (or the IsMouseOver property is “true”), but it doesn’t matter here), the country changes the background color .
If in some country == 1 way, there are no problems. But what can I do if in some countries there is more than one way?
So my question is: how to group paths in one object?
I tried to use the GeometryGroup class, but I cannot use it correctly ...
Do you have any ideas?
source
share