What is the best way to implement graphics for a selected item in a WPF custom control?

I have implemented several different WPF custom controls. That being said, I've also implemented several different ways to implement graphics when selecting an item.

I want to know how others do it and what do they think is the best way to do it?

Only one solution for each answer.

To avoid confusion, here are some examples of graphics indicating that an item is selected:

  • Adding graphics to the adorner layer for an element.
  • Changing the color of an item based on the IsSelected property in the data.
  • Procedurally show / hide an element in XAML that indicates a selection.
0


a source to share


1 answer


What do you mean by "graphics implementation"? Typically, an element displays with a SystemColors.HighlightBrush background when selected. Any system other than this can be difficult for casual users to understand.



0


a source







All Articles