Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<winrt::Microsoft::UI::Composition::ContainerVisual>());
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;
}

Expand Down Expand Up @@ -82,8 +82,10 @@ void ContentIslandComponentView::ParentLayoutChanged() noexcept {
if (auto strongThis = wkThis.get()) {
auto clientRect = strongThis->getClientRect();

strongThis->m_childContentLink.OffsetOverride(
{static_cast<float>(clientRect.left), static_cast<float>(clientRect.top)});
strongThis->m_childSiteLink.LocalToParentTransformMatrix(
winrt::Windows::Foundation::Numerics::make_float4x4_translation(
static_cast<float>(clientRect.left), static_cast<float>(clientRect.top), 0.0f));

strongThis->m_layoutChangePosted = false;
}
});
Expand Down Expand Up @@ -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
Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct ContentIslandComponentView : ContentIslandComponentViewT<ContentIslandCom
winrt::event_token m_unmountedToken;
std::vector<winrt::Microsoft::ReactNative::ComponentView::LayoutMetricsChanged_revoker> m_layoutMetricChangedRevokers;
#ifdef USE_EXPERIMENTAL_WINUI3
winrt::Microsoft::UI::Content::ChildContentLink m_childContentLink{nullptr};
winrt::Microsoft::UI::Content::ChildSiteLink m_childSiteLink{nullptr};
#endif
};

Expand Down
9 changes: 5 additions & 4 deletions vnext/PropertySheets/WinUI.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@

<!--
Internal versions are located at: https://microsoft.visualstudio.com/DefaultCollection/ProjectReunion/_artifacts/feed/Project.Reunion.nuget.internal/NuGet/Microsoft.WindowsAppSDK/versions
For local testing of internal versions, modify the WinUI3Version, and comment out the addition nuget source in NuGet.Config
For local testing of internal versions, modify WinUI3ExperimentalVersion, and comment out the addition nuget source in NuGet.Config
-->
<!-- This value is also used by the CLI, see /packages/@react-native-windows/generate-windows -->
<WinUI3Version Condition="'$(WinUI3Version)'=='' AND '$(UseExperimentalWinUI3)'=='true'">1.6.240701003-experimental2</WinUI3Version>
<WinUI3ExperimentalVersion Condition="'$(WinUI3ExperimentalVersion)'==''">1.7.250109001-experimental2</WinUI3ExperimentalVersion>
<!-- This value is also used by the CLI, see /packages/@react-native-windows/cli/.../autolinkWindows.ts -->
<WinUI3Version Condition="'$(WinUI3Version)'=='' AND '$(UseExperimentalWinUI3)'=='true'">$(WinUI3ExperimentalVersion)</WinUI3Version>
<WinUI3Version Condition="'$(WinUI3Version)'==''">1.6.240923002</WinUI3Version>
</PropertyGroup>

<PropertyGroup Label="WinUI2x versioning">
<!--This value is also used by the CLI, see /packages/@react-native-windows/generate-windows -->
<!--This value is also used by the CLI, see /packages/@react-native-windows/cli/.../autolinkWindows.ts -->
<WinUI2xVersion Condition="'$(WinUI2xVersion)'==''">2.8.0</WinUI2xVersion>
</PropertyGroup>

Expand Down
Loading