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

Implement IsAncestorSiteInDesignMode. #5375

Merged
merged 4 commits into from
Aug 11, 2021

Conversation

KlausLoeffelmann
Copy link
Member

@KlausLoeffelmann KlausLoeffelmann commented Jul 30, 2021

Fixes #4146.
Resolves #3300

[Update]: This is now implemented as originally planned.

Wrote a small Test app for this, which should also serve as a guidance for best practice.
It is currently here: https://github.com/KlausLoeffelmann/IsAncestorSiteInDesignMode/blob/main/README.md

Shows where and how to use correctly DesignMode and IsAncestorSiteInDesignMode for (derived) Forms, UserControls hosted in Forms and Controls:

image

Microsoft Reviewers: Open in CodeFlow

@merriemcgaw
Copy link
Member

I'm very much OK with going forward with the original proposed API as approved.

@KlausLoeffelmann
Copy link
Member Author

Yes. I had a discussion about this today with @JeremyKuhne, and he said the same thing.
If we want more options, we do that with additional APIs later. Also, I think we should wait for the License discussion to be resolved.

@merriemcgaw
Copy link
Member

Let's not block on licensing for this effort.

@KlausLoeffelmann
Copy link
Member Author

No, I mean with a potential additional API. This should fly as it is now.

@KlausLoeffelmann KlausLoeffelmann marked this pull request as ready for review August 10, 2021 23:32
@KlausLoeffelmann KlausLoeffelmann requested a review from a team as a code owner August 10, 2021 23:32
@KlausLoeffelmann KlausLoeffelmann merged commit e55ebf1 into main Aug 11, 2021
@KlausLoeffelmann KlausLoeffelmann deleted the dev/klloeffe/IsAncestorSiteInDesignMode branch August 11, 2021 02:07
@ghost ghost added this to the 6.0 rc1 milestone Aug 11, 2021
@RussKie RussKie mentioned this pull request Nov 3, 2021
@RussKie
Copy link
Member

RussKie commented Nov 4, 2021

@KlausLoeffelmann could you please clarify the reason why we didn't add this API to Component class, where DesignMode property is defined? So we can document it.

@KlausLoeffelmann
Copy link
Member Author

A Component is not part of the control's collection. It doesn't work that way. You could not traverse up to check a parent for being sited, since there isn't one.

@ghost ghost locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add IsAncestorSiteInDesignMode for Control Design Mode check
3 participants