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

Expose ImageProps from ImageComponentView's and add ImageSource type #13206

Merged
merged 8 commits into from May 13, 2024

Conversation

acoates-ms
Copy link
Contributor

@acoates-ms acoates-ms commented May 9, 2024

Description

Adding a new ImageProps object to allow querying of properties from ImageComponentViews. This also includes adding a new ImageSource type, with a ReadValue function, which can be used by custom components needing to parse ImageSource types from JS, and in future codegen of custom Props objects.

Open Question

Ideally the props would be exposed as:

runtimeclass ViewProps;
runtimeclass ImageProps : ViewProps;
 
runtimeclass ViewComponent {
 ViewProps Props {get;};
}
 
runtimeclass ImageComponent {
 ImageProps Props {get;}
}

However, I'm not sure if that kind of override is supported and didn't have much luck making it. So instead, I added a separate ImageProps property to ImageComponentView. If anyone knows how to get the above to work that would be a cleaner interface.

Microsoft Reviewers: Open in CodeFlow

@acoates-ms acoates-ms requested review from a team as code owners May 9, 2024 16:09
@acoates-ms acoates-ms merged commit 8f366c5 into microsoft:main May 13, 2024
53 checks passed
@acoates-ms acoates-ms deleted the imageprops branch May 13, 2024 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants