c# - WPF "Selected" Property of Custom Control or "Logical Focus". What should be used? -
In my WPF project I have a custom control that is displayed by a rectangular object. In XAMAL I put several rectangles based on this custom control. The user should be able to select a group of these references by mouse click and then take some actions with these selected rectangles.
How should I apply the possibility of selection: (1) I should just add another custom property such as "selected" and change it to mouseclick event handler or (2) I have the basic "logical focus" functionality Should use?
I argue that if you are creating selection logic in your control, then you have the functionality Can already be duplicated by the existing selector
subclasses like ListBox
. Why do the logic of selection within the ListBox
not just host your control?
Comments
Post a Comment