Skip to content

Commit

Permalink
Merge branch 'winui3/release/1.6-stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
reunion-maestro-bot committed Aug 22, 2024
2 parents 71e8332 + e6aafa6 commit 137c8d6
Show file tree
Hide file tree
Showing 123 changed files with 1,956 additions and 582 deletions.
33 changes: 22 additions & 11 deletions src/controls/dev/Generated/ScrollPresenter.properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ ScrollPresenterProperties::ScrollPresenterProperties()
, m_extentChangedEventSource{static_cast<ScrollPresenter*>(this)}
, m_scrollAnimationStartingEventSource{static_cast<ScrollPresenter*>(this)}
, m_scrollCompletedEventSource{static_cast<ScrollPresenter*>(this)}
, m_scrollStartingEventSource{static_cast<ScrollPresenter*>(this)}
, m_stateChangedEventSource{static_cast<ScrollPresenter*>(this)}
, m_viewChangedEventSource{static_cast<ScrollPresenter*>(this)}
, m_viewChangingEventSource{static_cast<ScrollPresenter*>(this)}
, m_zoomAnimationStartingEventSource{static_cast<ScrollPresenter*>(this)}
, m_zoomCompletedEventSource{static_cast<ScrollPresenter*>(this)}
, m_zoomStartingEventSource{static_cast<ScrollPresenter*>(this)}
{
EnsureProperties();
}
Expand Down Expand Up @@ -747,6 +748,16 @@ void ScrollPresenterProperties::ScrollCompleted(winrt::event_token const& token)
m_scrollCompletedEventSource.remove(token);
}

winrt::event_token ScrollPresenterProperties::ScrollStarting(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingScrollStartingEventArgs> const& value)
{
return m_scrollStartingEventSource.add(value);
}

void ScrollPresenterProperties::ScrollStarting(winrt::event_token const& token)
{
m_scrollStartingEventSource.remove(token);
}

winrt::event_token ScrollPresenterProperties::StateChanged(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::IInspectable> const& value)
{
return m_stateChangedEventSource.add(value);
Expand All @@ -767,16 +778,6 @@ void ScrollPresenterProperties::ViewChanged(winrt::event_token const& token)
m_viewChangedEventSource.remove(token);
}

winrt::event_token ScrollPresenterProperties::ViewChanging(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingViewChangingEventArgs> const& value)
{
return m_viewChangingEventSource.add(value);
}

void ScrollPresenterProperties::ViewChanging(winrt::event_token const& token)
{
m_viewChangingEventSource.remove(token);
}

winrt::event_token ScrollPresenterProperties::ZoomAnimationStarting(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingZoomAnimationStartingEventArgs> const& value)
{
return m_zoomAnimationStartingEventSource.add(value);
Expand All @@ -796,3 +797,13 @@ void ScrollPresenterProperties::ZoomCompleted(winrt::event_token const& token)
{
m_zoomCompletedEventSource.remove(token);
}

winrt::event_token ScrollPresenterProperties::ZoomStarting(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingZoomStartingEventArgs> const& value)
{
return m_zoomStartingEventSource.add(value);
}

void ScrollPresenterProperties::ZoomStarting(winrt::event_token const& token)
{
m_zoomStartingEventSource.remove(token);
}
9 changes: 6 additions & 3 deletions src/controls/dev/Generated/ScrollPresenter.properties.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,27 +111,30 @@ class ScrollPresenterProperties
void ScrollAnimationStarting(winrt::event_token const& token);
winrt::event_token ScrollCompleted(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingScrollCompletedEventArgs> const& value);
void ScrollCompleted(winrt::event_token const& token);
winrt::event_token ScrollStarting(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingScrollStartingEventArgs> const& value);
void ScrollStarting(winrt::event_token const& token);
winrt::event_token StateChanged(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::IInspectable> const& value);
void StateChanged(winrt::event_token const& token);
winrt::event_token ViewChanged(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::IInspectable> const& value);
void ViewChanged(winrt::event_token const& token);
winrt::event_token ViewChanging(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingViewChangingEventArgs> const& value);
void ViewChanging(winrt::event_token const& token);
winrt::event_token ZoomAnimationStarting(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingZoomAnimationStartingEventArgs> const& value);
void ZoomAnimationStarting(winrt::event_token const& token);
winrt::event_token ZoomCompleted(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingZoomCompletedEventArgs> const& value);
void ZoomCompleted(winrt::event_token const& token);
winrt::event_token ZoomStarting(winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingZoomStartingEventArgs> const& value);
void ZoomStarting(winrt::event_token const& token);

event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingAnchorRequestedEventArgs>> m_anchorRequestedEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingBringingIntoViewEventArgs>> m_bringingIntoViewEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::IInspectable>> m_extentChangedEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingScrollAnimationStartingEventArgs>> m_scrollAnimationStartingEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingScrollCompletedEventArgs>> m_scrollCompletedEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingScrollStartingEventArgs>> m_scrollStartingEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::IInspectable>> m_stateChangedEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::IInspectable>> m_viewChangedEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingViewChangingEventArgs>> m_viewChangingEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingZoomAnimationStartingEventArgs>> m_zoomAnimationStartingEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingZoomCompletedEventArgs>> m_zoomCompletedEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollPresenter, winrt::ScrollingZoomStartingEventArgs>> m_zoomStartingEventSource;

static void EnsureProperties();
static void ClearProperties();
Expand Down
33 changes: 22 additions & 11 deletions src/controls/dev/Generated/ScrollView.properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ ScrollViewProperties::ScrollViewProperties()
, m_extentChangedEventSource{static_cast<ScrollView*>(this)}
, m_scrollAnimationStartingEventSource{static_cast<ScrollView*>(this)}
, m_scrollCompletedEventSource{static_cast<ScrollView*>(this)}
, m_scrollStartingEventSource{static_cast<ScrollView*>(this)}
, m_stateChangedEventSource{static_cast<ScrollView*>(this)}
, m_viewChangedEventSource{static_cast<ScrollView*>(this)}
, m_viewChangingEventSource{static_cast<ScrollView*>(this)}
, m_zoomAnimationStartingEventSource{static_cast<ScrollView*>(this)}
, m_zoomCompletedEventSource{static_cast<ScrollView*>(this)}
, m_zoomStartingEventSource{static_cast<ScrollView*>(this)}
{
EnsureProperties();
}
Expand Down Expand Up @@ -883,6 +884,16 @@ void ScrollViewProperties::ScrollCompleted(winrt::event_token const& token)
m_scrollCompletedEventSource.remove(token);
}

winrt::event_token ScrollViewProperties::ScrollStarting(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingScrollStartingEventArgs> const& value)
{
return m_scrollStartingEventSource.add(value);
}

void ScrollViewProperties::ScrollStarting(winrt::event_token const& token)
{
m_scrollStartingEventSource.remove(token);
}

winrt::event_token ScrollViewProperties::StateChanged(winrt::TypedEventHandler<winrt::ScrollView, winrt::IInspectable> const& value)
{
return m_stateChangedEventSource.add(value);
Expand All @@ -903,16 +914,6 @@ void ScrollViewProperties::ViewChanged(winrt::event_token const& token)
m_viewChangedEventSource.remove(token);
}

winrt::event_token ScrollViewProperties::ViewChanging(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingViewChangingEventArgs> const& value)
{
return m_viewChangingEventSource.add(value);
}

void ScrollViewProperties::ViewChanging(winrt::event_token const& token)
{
m_viewChangingEventSource.remove(token);
}

winrt::event_token ScrollViewProperties::ZoomAnimationStarting(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingZoomAnimationStartingEventArgs> const& value)
{
return m_zoomAnimationStartingEventSource.add(value);
Expand All @@ -932,3 +933,13 @@ void ScrollViewProperties::ZoomCompleted(winrt::event_token const& token)
{
m_zoomCompletedEventSource.remove(token);
}

winrt::event_token ScrollViewProperties::ZoomStarting(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingZoomStartingEventArgs> const& value)
{
return m_zoomStartingEventSource.add(value);
}

void ScrollViewProperties::ZoomStarting(winrt::event_token const& token)
{
m_zoomStartingEventSource.remove(token);
}
9 changes: 6 additions & 3 deletions src/controls/dev/Generated/ScrollView.properties.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,27 +131,30 @@ class ScrollViewProperties
void ScrollAnimationStarting(winrt::event_token const& token);
winrt::event_token ScrollCompleted(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingScrollCompletedEventArgs> const& value);
void ScrollCompleted(winrt::event_token const& token);
winrt::event_token ScrollStarting(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingScrollStartingEventArgs> const& value);
void ScrollStarting(winrt::event_token const& token);
winrt::event_token StateChanged(winrt::TypedEventHandler<winrt::ScrollView, winrt::IInspectable> const& value);
void StateChanged(winrt::event_token const& token);
winrt::event_token ViewChanged(winrt::TypedEventHandler<winrt::ScrollView, winrt::IInspectable> const& value);
void ViewChanged(winrt::event_token const& token);
winrt::event_token ViewChanging(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingViewChangingEventArgs> const& value);
void ViewChanging(winrt::event_token const& token);
winrt::event_token ZoomAnimationStarting(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingZoomAnimationStartingEventArgs> const& value);
void ZoomAnimationStarting(winrt::event_token const& token);
winrt::event_token ZoomCompleted(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingZoomCompletedEventArgs> const& value);
void ZoomCompleted(winrt::event_token const& token);
winrt::event_token ZoomStarting(winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingZoomStartingEventArgs> const& value);
void ZoomStarting(winrt::event_token const& token);

event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingAnchorRequestedEventArgs>> m_anchorRequestedEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingBringingIntoViewEventArgs>> m_bringingIntoViewEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::IInspectable>> m_extentChangedEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingScrollAnimationStartingEventArgs>> m_scrollAnimationStartingEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingScrollCompletedEventArgs>> m_scrollCompletedEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingScrollStartingEventArgs>> m_scrollStartingEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::IInspectable>> m_stateChangedEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::IInspectable>> m_viewChangedEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingViewChangingEventArgs>> m_viewChangingEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingZoomAnimationStartingEventArgs>> m_zoomAnimationStartingEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingZoomCompletedEventArgs>> m_zoomCompletedEventSource;
event_source<winrt::TypedEventHandler<winrt::ScrollView, winrt::ScrollingZoomStartingEventArgs>> m_zoomStartingEventSource;

static void EnsureProperties();
static void ClearProperties();
Expand Down
8 changes: 6 additions & 2 deletions src/controls/dev/NavigationView/NavigationView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2407,13 +2407,17 @@ void NavigationView::ChangeSelection(const winrt::IInspectable& prevItem, const
m_pendingSelectionChangedItem = nextItem;
m_pendingSelectionChangedDirection = recommendedDirection;

// Previously we used get_weak() here, but we hit a refcounting problem where
// in some scenarios the outer object gets an extra Release() in this process.
auto weakThis {winrt::make_weak(static_cast<winrt::NavigationView>(*this))};
DispatcherQueue().TryEnqueue(
winrt::DispatcherQueuePriority::Low,
winrt::DispatcherQueueHandler([weakThis{get_weak()}]()
winrt::DispatcherQueueHandler([weakThis]()
{
if(auto strongThis = weakThis.get())
{
strongThis->CompletePendingSelectionChange();
NavigationView* rawThis = winrt::get_self<NavigationView>(strongThis);
rawThis->CompletePendingSelectionChange();
}
}));
}
Expand Down
1 change: 1 addition & 0 deletions src/controls/dev/Repeater/TestUI/RepeaterTestUIPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@

<StackPanel>
<TextBlock Text="Other Samples" Style="{ThemeResource HeaderTextBlockStyle}"/>
<Button x:Name="objectModelTest" AutomationProperties.Name="Object Model Test">Object Model Test</Button>
<Button x:Name="defaultDemo" AutomationProperties.Name="Default Demo">Default Demo</Button>
<Button x:Name="basicDemo" AutomationProperties.Name="Basic Demo">Basic Demo</Button>
<Button x:Name="uniformGridLayoutDemo" AutomationProperties.Name="UniformGridLayoutDemo">UniformGridLayout testing</Button>
Expand Down
5 changes: 5 additions & 0 deletions src/controls/dev/Repeater/TestUI/RepeaterTestUIPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ public RepeaterTestUIPage()
{
this.InitializeComponent();

objectModelTest.Click += delegate
{
Frame.NavigateWithoutAnimation(typeof(ObjectModelTestPage));
};

defaultDemo.Click += delegate
{
Frame.NavigateWithoutAnimation(typeof(Defaults));
Expand Down
27 changes: 13 additions & 14 deletions src/controls/dev/Repeater/TestUI/Repeater_TestUI.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
<Generator>MSBuild:Compile</Generator>
<IncludeInWindowsAppx>false</IncludeInWindowsAppx>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Samples\ObjectModelTestPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Samples\BasicDemo.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down Expand Up @@ -145,21 +149,28 @@
<Compile Include="$(MSBuildThisFileDirectory)Samples\AnimationSamples\AnimationsDemoPage.xaml.cs">
<DependentUpon>AnimationsDemoPage.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Samples\ObjectModelTestPage.xaml.cs">
<DependentUpon>ObjectModelTestPage.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Samples\BasicDemo.xaml.cs">
<DependentUpon>BasicDemo.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Samples\LayoutSamples\NonVirtualLayoutPages\CircleLayout.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Samples\Defaults.xaml.cs">
<DependentUpon>Defaults.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Samples\ItemsSourceSamples\ElementsInItemsSourcePage.xaml.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Samples\ItemsSourceSamples\ElementsInItemsSourcePage.xaml.cs">
<DependentUpon>ElementsInItemsSourcePage.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Samples\LayoutSamples\VirtualLayoutPages\FlowLayoutDemoPage.xaml.cs">
<DependentUpon>FlowLayoutDemoPage.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Samples\ItemTemplateSamples\ItemTemplateDemo.xaml.cs">
<DependentUpon>ItemTemplateDemo.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Samples\AnimationSamples\ScaleAnimatedVerticalListDemo.xaml.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Samples\AnimationSamples\ScaleAnimatedVerticalListDemo.xaml.cs">
<DependentUpon>ScaleAnimatedVerticalListDemo.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Samples\LayoutSamples\NonVirtualLayoutPages\NonVirtualStackLayoutSamplePage.xaml.cs">
<DependentUpon>NonVirtualStackLayoutSamplePage.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -233,16 +244,4 @@
<Link>Images\%(Filename)%(Extension)</Link>
</Content>
</ItemGroup>
<ItemGroup>
<Compile Update="$(MSBuildThisFileDirectory)Samples\ScaleAnimatedVerticalListDemo.xaml.cs">
<DependentUpon>ScaleAnimatedVerticalListDemo.xaml</DependentUpon>
</Compile>
<Compile Update="$(MSBuildThisFileDirectory)Samples\ElementsInItemsSourcePage.xaml.cs">
<DependentUpon>ElementsInItemsSourcePage.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)Samples\LayoutSamples\" />
<Folder Include="$(MSBuildThisFileDirectory)Samples\AnimationSamples\" />
</ItemGroup>
</Project>
Loading

0 comments on commit 137c8d6

Please sign in to comment.