diff --git a/change/react-native-windows-ed7b2b09-74fa-4fe0-9de3-57c3ae856148.json b/change/react-native-windows-ed7b2b09-74fa-4fe0-9de3-57c3ae856148.json new file mode 100644 index 00000000000..7a574a59c43 --- /dev/null +++ b/change/react-native-windows-ed7b2b09-74fa-4fe0-9de3-57c3ae856148.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Update WinUI3ExperimentalVersion from 1.6.240701003-experimental2 to 1.7.250109001-experimental2", + "packageName": "react-native-windows", + "email": "50150435+JesseCol@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp index 70f73d834fa..2d9ac52b823 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp @@ -42,13 +42,13 @@ ContentIslandComponentView::ContentIslandComponentView( void ContentIslandComponentView::OnMounted() noexcept { #ifdef USE_EXPERIMENTAL_WINUI3 - m_childContentLink = winrt::Microsoft::UI::Content::ChildContentLink::Create( + m_childSiteLink = winrt::Microsoft::UI::Content::ChildSiteLink::Create( rootComponentView()->parentContentIsland(), winrt::Microsoft::ReactNative::Composition::Experimental::CompositionContextHelper::InnerVisual(Visual()) .as()); - m_childContentLink.ActualSize({m_layoutMetrics.frame.size.width, m_layoutMetrics.frame.size.height}); + m_childSiteLink.ActualSize({m_layoutMetrics.frame.size.width, m_layoutMetrics.frame.size.height}); if (m_islandToConnect) { - m_childContentLink.Connect(m_islandToConnect); + m_childSiteLink.Connect(m_islandToConnect); m_islandToConnect = nullptr; } @@ -82,8 +82,10 @@ void ContentIslandComponentView::ParentLayoutChanged() noexcept { if (auto strongThis = wkThis.get()) { auto clientRect = strongThis->getClientRect(); - strongThis->m_childContentLink.OffsetOverride( - {static_cast(clientRect.left), static_cast(clientRect.top)}); + strongThis->m_childSiteLink.LocalToParentTransformMatrix( + winrt::Windows::Foundation::Numerics::make_float4x4_translation( + static_cast(clientRect.left), static_cast(clientRect.top), 0.0f)); + strongThis->m_layoutChangePosted = false; } }); @@ -114,8 +116,8 @@ void ContentIslandComponentView::updateLayoutMetrics( facebook::react::LayoutMetrics const &layoutMetrics, facebook::react::LayoutMetrics const &oldLayoutMetrics) noexcept { #ifdef USE_EXPERIMENTAL_WINUI3 - if (m_childContentLink) { - m_childContentLink.ActualSize({layoutMetrics.frame.size.width, layoutMetrics.frame.size.height}); + if (m_childSiteLink) { + m_childSiteLink.ActualSize({layoutMetrics.frame.size.width, layoutMetrics.frame.size.height}); ParentLayoutChanged(); } #endif @@ -124,9 +126,9 @@ void ContentIslandComponentView::updateLayoutMetrics( void ContentIslandComponentView::Connect(const winrt::Microsoft::UI::Content::ContentIsland &contentIsland) noexcept { #ifdef USE_EXPERIMENTAL_WINUI3 - if (m_childContentLink) { + if (m_childSiteLink) { m_islandToConnect = nullptr; - m_childContentLink.Connect(contentIsland); + m_childSiteLink.Connect(contentIsland); } else { m_islandToConnect = contentIsland; } diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h b/vnext/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h index fce95ffb076..6efaefde99d 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h @@ -55,7 +55,7 @@ struct ContentIslandComponentView : ContentIslandComponentViewT m_layoutMetricChangedRevokers; #ifdef USE_EXPERIMENTAL_WINUI3 - winrt::Microsoft::UI::Content::ChildContentLink m_childContentLink{nullptr}; + winrt::Microsoft::UI::Content::ChildSiteLink m_childSiteLink{nullptr}; #endif }; diff --git a/vnext/PropertySheets/WinUI.props b/vnext/PropertySheets/WinUI.props index dc60e676ed7..6739ad10ec2 100644 --- a/vnext/PropertySheets/WinUI.props +++ b/vnext/PropertySheets/WinUI.props @@ -4,15 +4,16 @@ - - 1.6.240701003-experimental2 + 1.7.250109001-experimental2 + + $(WinUI3ExperimentalVersion) 1.6.240923002 - + 2.8.0