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

Add ability to set up native control when subclassing NativeControlHost #2590

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

cwensley
Copy link
Member

@cwensley cwensley commented Dec 6, 2023

This gives a better pattern for subclassing the NativeControlHost and creating the native control using a callback.

A few tweaks to the naming (controlObject > nativeControl), and ensure the ToEto() helpers for each platform uses the NativeControlHost instead of hooking up manually.

E.g.

class MyControl : NativeControlHost
{
	protected override void OnCreateNativeControl(CreateNativeControlArgs e)
	{
		base.OnCreateNativeControl(e);
		e.NativeControl = yourNativeControlOrHandle;
	}
}

@cwensley cwensley added this to the 2.8.3 milestone Dec 6, 2023
@cwensley cwensley force-pushed the curtis/nativecontrolhost-subclass branch from b3be193 to 500a5a2 Compare December 6, 2023 17:40
@cwensley cwensley force-pushed the curtis/nativecontrolhost-subclass branch from 500a5a2 to 7cb4b9e Compare December 6, 2023 18:24
@cwensley cwensley merged commit ab88733 into picoe:develop Dec 6, 2023
3 checks passed
@cwensley cwensley deleted the curtis/nativecontrolhost-subclass branch December 6, 2023 19:29
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.

1 participant