-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Great Interface Removal Part I #9553
Conversation
`IAvaloniaObject`, `IControl`, `ILayoutable`, `IPanel`, `IStyledElement`, `IVisual`.
You can test this PR using the following package version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
40% LGTM 60% YOLO
You can test this PR using the following package version. |
…on-handler fix logic that was broken accidentally in #9553
I have a question. How is it possible to assign StyleKey if IStyleable is going to be removed? |
@rabbitism it was discussed in the #9495 |
This was signalled for removal in #9553, but I was hesitant to do it because it will be in use by a lot of code in order to override `StyleKey`. Instead of removing it, deprecate it and provide a virtual `StyledElement.StyleKeyOverride` property as the supported way of overriding a control's style key.
What does the pull request do?
As discussed in #9495, removes a bunch of unneeded interfaces; the concrete classes should be used from this point on:
IAvaloniaObject
->AvaloniaObject
IControl
->Control
IInteractive
->Interactive
ILayoutable
->Layoutable
IPanel
->Panel
IStyledElement
->StyledElement
ITemplatedControl
->TemplatedControl
IVisual
->Visual
In a few cases, the interfaces were used to hide less commonly needed functionality, e.g.
IVisual.VisualRoot
: the extension methods should be used, e.g.control.GetVisualRoot()
.Doesn't remove
IStyleable
yet, that will come in a later PR (perhaps some other interfaces can be removed too).Breaking changes
Yes :)
Fixed issues
Fixes #9495