Open LeNitrous opened 3 years ago
Does this lead to an actual issue?
Specific to my project where I need to set the enabled/disabled visual state of a tab item. I was rather confused as to why Enabled.Value
was always false when TabItem
was inheriting from ClickableContainer
.
I think you can go ahead and make a PR with tests, sounds like a sane direction. Only potential issue is avoiding a consume overwriting the action, causing the tab control not to work (my need consideration, with a new
implementation of Action
).
This is because
TabItem
inherits fromClickableContainer
which hasAction
andEnabled
. But onlyEnabled.Value
is set whenAction
has value.TabItem
overridesOnClick
and has its ownActivationRequested
action which is invoked by theTabControl<T>
thus being the reason why it still can be clicked on even ifEnabled.Value
is false.A sane solution would be to do something like
This would also make way to allowing disabling specific tabs which I think isn't possible at the moment.
I'm unsure if there are other reasons why
Action
is unused. I'll take on creating a PR after hearing the thoughts of others.