Skip to content

Conversation

@la-thorn
Copy link
Member

The default template describes what not to do with InitializeComponent, but it doesn't describe how developers are supposed to interact with it. This change clarifies the comment so it's more obvious why the link is relevant to the developer.

@kennykerr kennykerr requested a review from Scottj1s September 13, 2024 19:42
@dmachaj
Copy link
Contributor

dmachaj commented Sep 13, 2024

As a suggestion, this pattern is also useful for cases where you need to subscribe to callbacks or produce weak references to hand out. It is usually unsafe to do that during construction but it is safe after the constructor has completed without throwing.

@la-thorn
Copy link
Member Author

As a suggestion, this pattern is also useful for cases where you need to subscribe to callbacks or produce weak references to hand out. It is usually unsafe to do that during construction but it is safe after the constructor has completed without throwing.

That's a good callout. In an ideal world, I think it'd be good if the documentation covered that stuff, but I don't think it does. I'd offer to update it myself, but I think that may be an exercise better left to someone with more familiarity with the subject matter.

@dmachaj dmachaj merged commit c5e0aae into microsoft:master Sep 16, 2024
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.

3 participants