views:

58

answers:

2

Say, I build a dynamic map in WPF.

I need to represent in this map locations(say, cities).

The representation of a city is simple: a dot (circle or image) and the text.

Both text and dot image are customizable.

What would you recommend using as a CityControl in WPF?
alt text
Examples:

  • A UserControl having an <Ellipse>(or picture) and <TextBlock>?
  • A CustomControl extending a <TextBlock> with a specific style? (is it possible to set the style inside this control)
  • ...something else?
A: 

I would go for a Ellipse, you can then define different properties such as color etc.

<CityControl>
   <Ellipse>
   <GeoInformation>
   <TextBlock>
   etc..
kyndigs
so, what is it? a WPF UserControl?
serhio
+1  A: 

Google something like "WPF UserControl vs CustomControl" and you'll get a whole list of articles pointing out the differences.

This one has a fairly simple explanation of the differences. You'll need to choose which one is best for your situation.

Rachel
Thanks, even if I didn't ask about the difference between UC and CC.
serhio