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

Why shape Render method is sealed #17840

Closed
lishilei0523 opened this issue Dec 28, 2024 · 1 comment
Closed

Why shape Render method is sealed #17840

lishilei0523 opened this issue Dec 28, 2024 · 1 comment
Labels
by-design The behavior reported in the issue is actually correct. question

Comments

@lishilei0523
Copy link

lishilei0523 commented Dec 28, 2024

public sealed override void Render(DrawingContext context);


please remove the sealed

@timunie timunie added by-design The behavior reported in the issue is actually correct. and removed enhancement labels Dec 28, 2024
@timunie
Copy link
Contributor

timunie commented Dec 28, 2024

That's by design. If you want to override OnRender, please inherit Control.

See: https://github.com/AvaloniaUI/Avalonia.Samples/tree/main/src%2FAvalonia.Samples%2FCustomControls%2FSnowflakesControlSample

Tip

For questions please use Telegram or GitHub discussions. If you open bug reports or feature requests please provide as much details as possible, for example why exactly you need this or that API.

@timunie timunie closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
by-design The behavior reported in the issue is actually correct. question
Projects
None yet
Development

No branches or pull requests

2 participants