views:

121

answers:

1

It should look like this:

alt text

  • I don't care about reusing it in other applications that need somewhat different looks.
  • It's just for display
  • Content needs to wrap, maximum 3 lines.

I'm trying to implement it as a derived class of UserControl with XAML defining the visual elements, but I'm not sure if that's the best option.

So how would you implement this type of component?

Edit

What I mean by I don't care about reusing is that I want a simple UserControl, where the component is defined in the XAML side of the UserControl. In other words, I don't need a "lookless" component, but one that looks exactly like the one above. Please also note that I'm not asking anybody to create it for me, just give me a few pointers on how you'd implement so I can have something to search.

A: 

I would do like this:

  • create a UserControl with two DependencyProperties Time and Label
  • in XAML bind your Time property with the Arc angle (eventually with a ValueConverter to get cartesian coordinates of the end point from the Time value). See How to create an Arc and use the explicit object tags so you can bind the elements you want
  • on each Timer timeout increase your Time property value
  • bind your Label property with a TextBlock Text for which you allow wrapping and fix a MaxWidth so it wraps when needed
Mart