Skip to content
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

Make all Render overrides sealed #10299

Merged
merged 1 commit into from Feb 10, 2023
Merged

Conversation

Takoooooo
Copy link
Contributor

What does the pull request do?

This is needed because at some point we might want to change the way built-in primitives are rasterized

Fixed issues

Fixes #10066

@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0029850-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-all/nuget/v3/index.json) [PRBUILDID]

@Takoooooo Takoooooo force-pushed the make-all-render-overrides-sealed branch from e672f4a to eb73175 Compare February 10, 2023 16:53
@kekekeks kekekeks enabled auto-merge (squash) February 10, 2023 16:56
@kekekeks kekekeks merged commit 23d999c into master Feb 10, 2023
@kekekeks kekekeks deleted the make-all-render-overrides-sealed branch February 10, 2023 17:18
@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0029858-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-all/nuget/v3/index.json) [PRBUILDID]

@tkefauver
Copy link
Contributor

@Takoooooo How are subclasses supposed to override Render now? In my case I have 2 custom controls inheriting from Border and Canvas.

@gusmanb
Copy link

gusmanb commented Apr 30, 2023

Same problem here, I have custom controls that inherit from Border and now they're dead...

Overriding Render is always useful, because you may want to just extend a bit what already exists, forcing developers to create a Control from scratch when there is something already done that may need just some minor changes is a very bad idea.

@tkefauver
Copy link
Contributor

@gusmanb Definitely agree :(

It ended up being pretty easy for my Border control though. Its a really basic one like what you're mentioning and I got it working... just had to replace Border.Child usage with UserControl.Content.

@29654761
Copy link

29654761 commented Aug 3, 2023

This is very bad idea.
Avalonia can almost do nothing.

@timunie
Copy link
Contributor

timunie commented Aug 3, 2023

@29654761 it's a bad idea to comment on merged PRs. Open a Discussion with your specific issue und use-case described. If possible, show sample code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make all Render method overrides sealed
7 participants