Skip to content

Commit c5e0aae

Browse files
authored
Clarify how InitializeComponent works in the template comment (#1435)
1 parent 64d2a52 commit c5e0aae

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

vsix/ItemTemplates/BlankPage/BlankPage.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace winrt::$rootnamespace$::implementation
99
$safeitemname$()
1010
{
1111
// Xaml objects should not call InitializeComponent during construction.
12+
// If a Xaml object needs to access a Xaml property during initialization, it should override InitializeComponent.
1213
// See https://github.com/microsoft/cppwinrt/tree/master/nuget#initializecomponent
1314
}
1415

vsix/ItemTemplates/BlankUserControl/BlankUserControl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace winrt::$rootnamespace$::implementation
1313
$safeitemname$()
1414
{
1515
// Xaml objects should not call InitializeComponent during construction.
16+
// If a Xaml object needs to access a Xaml property during initialization, it should override InitializeComponent.
1617
// See https://github.com/microsoft/cppwinrt/tree/master/nuget#initializecomponent
1718
}
1819

vsix/ProjectTemplates/VC/Windows Universal/BlankApp/MainPage.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace winrt::$safeprojectname$::implementation
99
MainPage()
1010
{
1111
// Xaml objects should not call InitializeComponent during construction.
12+
// If a Xaml object needs to access a Xaml property during initialization, it should override InitializeComponent.
1213
// See https://github.com/microsoft/cppwinrt/tree/master/nuget#initializecomponent
1314
}
1415

0 commit comments

Comments
 (0)