Skip to content

Commit

Permalink
Support WinAppSDK + cppwinrt 2.240111.5 (#12862)
Browse files Browse the repository at this point in the history
* Support WinAppSDK + cppwinrt 2.240111.5

See microsoft/cppwinrt#1393

We need to first convert the WinUI 3 control to IControlProtected to
access GetTemplateChild.

* Change files

* Apply C++/WinRT fix to both UWP and WinAppSDK
  • Loading branch information
rozele committed Mar 28, 2024
1 parent 0385d90 commit 467a8d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Support WinAppSDK + cppwinrt 2.240111.5",
"packageName": "react-native-windows",
"email": "erozell@outlook.com",
"dependentChangeType": "patch"
}
2 changes: 1 addition & 1 deletion vnext/Microsoft.ReactNative/Views/TextInputViewManager.cpp
Expand Up @@ -319,7 +319,7 @@ void TextInputShadowNode::registerEvents() {
}
}

auto contentElement = control.GetTemplateChild(L"ContentElement");
auto contentElement = control.as<xaml::Controls::IControlProtected>().GetTemplateChild(L"ContentElement");
auto textBoxView = contentElement.as<xaml::Controls::ScrollViewer>();
if (textBoxView) {
m_scrollViewerViewChangingRevoker = textBoxView.ViewChanging(
Expand Down

0 comments on commit 467a8d5

Please sign in to comment.