diff --git a/dev/Generated/ScrollBar2.properties.cpp b/dev/Generated/ScrollBar2.properties.cpp index 8b806520a6..0ece507d02 100644 --- a/dev/Generated/ScrollBar2.properties.cpp +++ b/dev/Generated/ScrollBar2.properties.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen @@ -120,10 +120,10 @@ void ScrollBar2Properties::EnsureProperties() s_ScrollModeProperty = InitializeDependencyProperty( L"ScrollMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(ScrollBar2::s_defaultScrollMode), + ValueHelper::BoxValueIfNecessary(ScrollBar2::s_defaultScrollMode), &OnPropertyChanged_ValidateScrollMode); } if (!s_SmallChangeProperty) @@ -178,12 +178,12 @@ void ScrollBar2Properties::OnPropertyChanged_ValidateScrollMode( { auto owner = sender.as(); - auto value = winrt::unbox_value(args.NewValue()); + auto value = winrt::unbox_value(args.NewValue()); auto coercedValue = value; winrt::get_self(owner)->ValidateScrollMode(coercedValue); if (value != coercedValue) { - sender.SetValue(args.Property(), winrt::box_value(coercedValue)); + sender.SetValue(args.Property(), winrt::box_value(coercedValue)); return; } @@ -270,15 +270,15 @@ winrt::Style ScrollBar2Properties::ScrollBarStyle() return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ScrollBarStyleProperty)); } -void ScrollBar2Properties::ScrollMode(winrt::ScrollerScrollMode const& value) +void ScrollBar2Properties::ScrollMode(winrt::ScrollMode const& value) { static_cast(this)->ValidateScrollMode(value); - static_cast(this)->SetValue(s_ScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_ScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerScrollMode ScrollBar2Properties::ScrollMode() +winrt::ScrollMode ScrollBar2Properties::ScrollMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ScrollModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ScrollModeProperty)); } void ScrollBar2Properties::SmallChange(double value) diff --git a/dev/Generated/ScrollBar2.properties.h b/dev/Generated/ScrollBar2.properties.h index 95e4e39069..0f9a4d1421 100644 --- a/dev/Generated/ScrollBar2.properties.h +++ b/dev/Generated/ScrollBar2.properties.h @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen @@ -33,8 +33,8 @@ class ScrollBar2Properties void ScrollBarStyle(winrt::Style const& value); winrt::Style ScrollBarStyle(); - void ScrollMode(winrt::ScrollerScrollMode const& value); - winrt::ScrollerScrollMode ScrollMode(); + void ScrollMode(winrt::ScrollMode const& value); + winrt::ScrollMode ScrollMode(); void SmallChange(double value); double SmallChange(); diff --git a/dev/Generated/ScrollViewer.properties.cpp b/dev/Generated/ScrollViewer.properties.cpp index 3a156c2ca3..24fb1a817a 100644 --- a/dev/Generated/ScrollViewer.properties.cpp +++ b/dev/Generated/ScrollViewer.properties.cpp @@ -54,10 +54,10 @@ void ScrollViewerProperties::EnsureProperties() s_ComputedHorizontalScrollModeProperty = InitializeDependencyProperty( L"ComputedHorizontalScrollMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultComputedHorizontalScrollMode), + ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultComputedHorizontalScrollMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_ComputedVerticalScrollModeProperty) @@ -65,10 +65,10 @@ void ScrollViewerProperties::EnsureProperties() s_ComputedVerticalScrollModeProperty = InitializeDependencyProperty( L"ComputedVerticalScrollMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultComputedVerticalScrollMode), + ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultComputedVerticalScrollMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_ContentProperty) @@ -109,10 +109,10 @@ void ScrollViewerProperties::EnsureProperties() s_HorizontalScrollChainingModeProperty = InitializeDependencyProperty( L"HorizontalScrollChainingMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultHorizontalScrollChainingMode), + ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultHorizontalScrollChainingMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_HorizontalScrollControllerProperty) @@ -131,10 +131,10 @@ void ScrollViewerProperties::EnsureProperties() s_HorizontalScrollModeProperty = InitializeDependencyProperty( L"HorizontalScrollMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultHorizontalScrollMode), + ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultHorizontalScrollMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_HorizontalScrollRailingModeProperty) @@ -142,10 +142,10 @@ void ScrollViewerProperties::EnsureProperties() s_HorizontalScrollRailingModeProperty = InitializeDependencyProperty( L"HorizontalScrollRailingMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultHorizontalScrollRailingMode), + ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultHorizontalScrollRailingMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_InputKindProperty) @@ -153,10 +153,10 @@ void ScrollViewerProperties::EnsureProperties() s_InputKindProperty = InitializeDependencyProperty( L"InputKind", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultInputKind), + ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultInputKind), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_IsAnchoredAtHorizontalExtentProperty) @@ -263,10 +263,10 @@ void ScrollViewerProperties::EnsureProperties() s_VerticalScrollChainingModeProperty = InitializeDependencyProperty( L"VerticalScrollChainingMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultVerticalScrollChainingMode), + ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultVerticalScrollChainingMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_VerticalScrollControllerProperty) @@ -285,10 +285,10 @@ void ScrollViewerProperties::EnsureProperties() s_VerticalScrollModeProperty = InitializeDependencyProperty( L"VerticalScrollMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultVerticalScrollMode), + ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultVerticalScrollMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_VerticalScrollRailingModeProperty) @@ -296,10 +296,10 @@ void ScrollViewerProperties::EnsureProperties() s_VerticalScrollRailingModeProperty = InitializeDependencyProperty( L"VerticalScrollRailingMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultVerticalScrollRailingMode), + ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultVerticalScrollRailingMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_ZoomChainingModeProperty) @@ -307,10 +307,10 @@ void ScrollViewerProperties::EnsureProperties() s_ZoomChainingModeProperty = InitializeDependencyProperty( L"ZoomChainingMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultZoomChainingMode), + ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultZoomChainingMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_ZoomModeProperty) @@ -318,10 +318,10 @@ void ScrollViewerProperties::EnsureProperties() s_ZoomModeProperty = InitializeDependencyProperty( L"ZoomMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultZoomMode), + ValueHelper::BoxValueIfNecessary(ScrollViewer::s_defaultZoomMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } } @@ -397,24 +397,24 @@ void ScrollViewerProperties::OnPropertyChanged_ValidateZoomFactoryBoundary( winrt::get_self(owner)->OnPropertyChanged(args); } -void ScrollViewerProperties::ComputedHorizontalScrollMode(winrt::ScrollerScrollMode const& value) +void ScrollViewerProperties::ComputedHorizontalScrollMode(winrt::ScrollMode const& value) { - static_cast(this)->SetValue(s_ComputedHorizontalScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_ComputedHorizontalScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerScrollMode ScrollViewerProperties::ComputedHorizontalScrollMode() +winrt::ScrollMode ScrollViewerProperties::ComputedHorizontalScrollMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ComputedHorizontalScrollModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ComputedHorizontalScrollModeProperty)); } -void ScrollViewerProperties::ComputedVerticalScrollMode(winrt::ScrollerScrollMode const& value) +void ScrollViewerProperties::ComputedVerticalScrollMode(winrt::ScrollMode const& value) { - static_cast(this)->SetValue(s_ComputedVerticalScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_ComputedVerticalScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerScrollMode ScrollViewerProperties::ComputedVerticalScrollMode() +winrt::ScrollMode ScrollViewerProperties::ComputedVerticalScrollMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ComputedVerticalScrollModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ComputedVerticalScrollModeProperty)); } void ScrollViewerProperties::Content(winrt::UIElement const& value) @@ -448,14 +448,14 @@ winrt::ScrollBarVisibility ScrollViewerProperties::HorizontalScrollBarVisibility return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_HorizontalScrollBarVisibilityProperty)); } -void ScrollViewerProperties::HorizontalScrollChainingMode(winrt::ScrollerChainingMode const& value) +void ScrollViewerProperties::HorizontalScrollChainingMode(winrt::ChainingMode const& value) { - static_cast(this)->SetValue(s_HorizontalScrollChainingModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_HorizontalScrollChainingModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerChainingMode ScrollViewerProperties::HorizontalScrollChainingMode() +winrt::ChainingMode ScrollViewerProperties::HorizontalScrollChainingMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_HorizontalScrollChainingModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_HorizontalScrollChainingModeProperty)); } void ScrollViewerProperties::HorizontalScrollController(winrt::IScrollController const& value) @@ -468,34 +468,34 @@ winrt::IScrollController ScrollViewerProperties::HorizontalScrollController() return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_HorizontalScrollControllerProperty)); } -void ScrollViewerProperties::HorizontalScrollMode(winrt::ScrollerScrollMode const& value) +void ScrollViewerProperties::HorizontalScrollMode(winrt::ScrollMode const& value) { - static_cast(this)->SetValue(s_HorizontalScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_HorizontalScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerScrollMode ScrollViewerProperties::HorizontalScrollMode() +winrt::ScrollMode ScrollViewerProperties::HorizontalScrollMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_HorizontalScrollModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_HorizontalScrollModeProperty)); } -void ScrollViewerProperties::HorizontalScrollRailingMode(winrt::ScrollerRailingMode const& value) +void ScrollViewerProperties::HorizontalScrollRailingMode(winrt::RailingMode const& value) { - static_cast(this)->SetValue(s_HorizontalScrollRailingModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_HorizontalScrollRailingModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerRailingMode ScrollViewerProperties::HorizontalScrollRailingMode() +winrt::RailingMode ScrollViewerProperties::HorizontalScrollRailingMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_HorizontalScrollRailingModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_HorizontalScrollRailingModeProperty)); } -void ScrollViewerProperties::InputKind(winrt::ScrollerInputKind const& value) +void ScrollViewerProperties::InputKind(winrt::InputKind const& value) { - static_cast(this)->SetValue(s_InputKindProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_InputKindProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerInputKind ScrollViewerProperties::InputKind() +winrt::InputKind ScrollViewerProperties::InputKind() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_InputKindProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_InputKindProperty)); } void ScrollViewerProperties::IsAnchoredAtHorizontalExtent(bool value) @@ -581,14 +581,14 @@ winrt::ScrollBarVisibility ScrollViewerProperties::VerticalScrollBarVisibility() return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_VerticalScrollBarVisibilityProperty)); } -void ScrollViewerProperties::VerticalScrollChainingMode(winrt::ScrollerChainingMode const& value) +void ScrollViewerProperties::VerticalScrollChainingMode(winrt::ChainingMode const& value) { - static_cast(this)->SetValue(s_VerticalScrollChainingModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_VerticalScrollChainingModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerChainingMode ScrollViewerProperties::VerticalScrollChainingMode() +winrt::ChainingMode ScrollViewerProperties::VerticalScrollChainingMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_VerticalScrollChainingModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_VerticalScrollChainingModeProperty)); } void ScrollViewerProperties::VerticalScrollController(winrt::IScrollController const& value) @@ -601,44 +601,44 @@ winrt::IScrollController ScrollViewerProperties::VerticalScrollController() return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_VerticalScrollControllerProperty)); } -void ScrollViewerProperties::VerticalScrollMode(winrt::ScrollerScrollMode const& value) +void ScrollViewerProperties::VerticalScrollMode(winrt::ScrollMode const& value) { - static_cast(this)->SetValue(s_VerticalScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_VerticalScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerScrollMode ScrollViewerProperties::VerticalScrollMode() +winrt::ScrollMode ScrollViewerProperties::VerticalScrollMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_VerticalScrollModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_VerticalScrollModeProperty)); } -void ScrollViewerProperties::VerticalScrollRailingMode(winrt::ScrollerRailingMode const& value) +void ScrollViewerProperties::VerticalScrollRailingMode(winrt::RailingMode const& value) { - static_cast(this)->SetValue(s_VerticalScrollRailingModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_VerticalScrollRailingModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerRailingMode ScrollViewerProperties::VerticalScrollRailingMode() +winrt::RailingMode ScrollViewerProperties::VerticalScrollRailingMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_VerticalScrollRailingModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_VerticalScrollRailingModeProperty)); } -void ScrollViewerProperties::ZoomChainingMode(winrt::ScrollerChainingMode const& value) +void ScrollViewerProperties::ZoomChainingMode(winrt::ChainingMode const& value) { - static_cast(this)->SetValue(s_ZoomChainingModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_ZoomChainingModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerChainingMode ScrollViewerProperties::ZoomChainingMode() +winrt::ChainingMode ScrollViewerProperties::ZoomChainingMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ZoomChainingModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ZoomChainingModeProperty)); } -void ScrollViewerProperties::ZoomMode(winrt::ScrollerZoomMode const& value) +void ScrollViewerProperties::ZoomMode(winrt::ZoomMode const& value) { - static_cast(this)->SetValue(s_ZoomModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_ZoomModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerZoomMode ScrollViewerProperties::ZoomMode() +winrt::ZoomMode ScrollViewerProperties::ZoomMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ZoomModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ZoomModeProperty)); } winrt::event_token ScrollViewerProperties::AnchorRequested(winrt::TypedEventHandler const& value) diff --git a/dev/Generated/ScrollViewer.properties.h b/dev/Generated/ScrollViewer.properties.h index 4de21d51a9..3767afeefa 100644 --- a/dev/Generated/ScrollViewer.properties.h +++ b/dev/Generated/ScrollViewer.properties.h @@ -9,11 +9,11 @@ class ScrollViewerProperties public: ScrollViewerProperties(); - void ComputedHorizontalScrollMode(winrt::ScrollerScrollMode const& value); - winrt::ScrollerScrollMode ComputedHorizontalScrollMode(); + void ComputedHorizontalScrollMode(winrt::ScrollMode const& value); + winrt::ScrollMode ComputedHorizontalScrollMode(); - void ComputedVerticalScrollMode(winrt::ScrollerScrollMode const& value); - winrt::ScrollerScrollMode ComputedVerticalScrollMode(); + void ComputedVerticalScrollMode(winrt::ScrollMode const& value); + winrt::ScrollMode ComputedVerticalScrollMode(); void Content(winrt::UIElement const& value); winrt::UIElement Content(); @@ -24,20 +24,20 @@ class ScrollViewerProperties void HorizontalScrollBarVisibility(winrt::ScrollBarVisibility const& value); winrt::ScrollBarVisibility HorizontalScrollBarVisibility(); - void HorizontalScrollChainingMode(winrt::ScrollerChainingMode const& value); - winrt::ScrollerChainingMode HorizontalScrollChainingMode(); + void HorizontalScrollChainingMode(winrt::ChainingMode const& value); + winrt::ChainingMode HorizontalScrollChainingMode(); void HorizontalScrollController(winrt::IScrollController const& value); winrt::IScrollController HorizontalScrollController(); - void HorizontalScrollMode(winrt::ScrollerScrollMode const& value); - winrt::ScrollerScrollMode HorizontalScrollMode(); + void HorizontalScrollMode(winrt::ScrollMode const& value); + winrt::ScrollMode HorizontalScrollMode(); - void HorizontalScrollRailingMode(winrt::ScrollerRailingMode const& value); - winrt::ScrollerRailingMode HorizontalScrollRailingMode(); + void HorizontalScrollRailingMode(winrt::RailingMode const& value); + winrt::RailingMode HorizontalScrollRailingMode(); - void InputKind(winrt::ScrollerInputKind const& value); - winrt::ScrollerInputKind InputKind(); + void InputKind(winrt::InputKind const& value); + winrt::InputKind InputKind(); void IsAnchoredAtHorizontalExtent(bool value); bool IsAnchoredAtHorizontalExtent(); @@ -63,23 +63,23 @@ class ScrollViewerProperties void VerticalScrollBarVisibility(winrt::ScrollBarVisibility const& value); winrt::ScrollBarVisibility VerticalScrollBarVisibility(); - void VerticalScrollChainingMode(winrt::ScrollerChainingMode const& value); - winrt::ScrollerChainingMode VerticalScrollChainingMode(); + void VerticalScrollChainingMode(winrt::ChainingMode const& value); + winrt::ChainingMode VerticalScrollChainingMode(); void VerticalScrollController(winrt::IScrollController const& value); winrt::IScrollController VerticalScrollController(); - void VerticalScrollMode(winrt::ScrollerScrollMode const& value); - winrt::ScrollerScrollMode VerticalScrollMode(); + void VerticalScrollMode(winrt::ScrollMode const& value); + winrt::ScrollMode VerticalScrollMode(); - void VerticalScrollRailingMode(winrt::ScrollerRailingMode const& value); - winrt::ScrollerRailingMode VerticalScrollRailingMode(); + void VerticalScrollRailingMode(winrt::RailingMode const& value); + winrt::RailingMode VerticalScrollRailingMode(); - void ZoomChainingMode(winrt::ScrollerChainingMode const& value); - winrt::ScrollerChainingMode ZoomChainingMode(); + void ZoomChainingMode(winrt::ChainingMode const& value); + winrt::ChainingMode ZoomChainingMode(); - void ZoomMode(winrt::ScrollerZoomMode const& value); - winrt::ScrollerZoomMode ZoomMode(); + void ZoomMode(winrt::ZoomMode const& value); + winrt::ZoomMode ZoomMode(); static winrt::DependencyProperty ComputedHorizontalScrollModeProperty() { return s_ComputedHorizontalScrollModeProperty; } static winrt::DependencyProperty ComputedVerticalScrollModeProperty() { return s_ComputedVerticalScrollModeProperty; } diff --git a/dev/Generated/Scroller.properties.cpp b/dev/Generated/Scroller.properties.cpp index e9fdfc84aa..6457ad0b81 100644 --- a/dev/Generated/Scroller.properties.cpp +++ b/dev/Generated/Scroller.properties.cpp @@ -72,10 +72,10 @@ void ScrollerProperties::EnsureProperties() s_ComputedHorizontalScrollModeProperty = InitializeDependencyProperty( L"ComputedHorizontalScrollMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(Scroller::s_defaultComputedVerticalScrollMode), + ValueHelper::BoxValueIfNecessary(Scroller::s_defaultComputedVerticalScrollMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_ComputedVerticalScrollModeProperty) @@ -83,10 +83,10 @@ void ScrollerProperties::EnsureProperties() s_ComputedVerticalScrollModeProperty = InitializeDependencyProperty( L"ComputedVerticalScrollMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(Scroller::s_defaultComputedVerticalScrollMode), + ValueHelper::BoxValueIfNecessary(Scroller::s_defaultComputedVerticalScrollMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_HorizontalAnchorRatioProperty) @@ -105,10 +105,10 @@ void ScrollerProperties::EnsureProperties() s_HorizontalScrollChainingModeProperty = InitializeDependencyProperty( L"HorizontalScrollChainingMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(Scroller::s_defaultHorizontalScrollChainingMode), + ValueHelper::BoxValueIfNecessary(Scroller::s_defaultHorizontalScrollChainingMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_HorizontalScrollModeProperty) @@ -116,10 +116,10 @@ void ScrollerProperties::EnsureProperties() s_HorizontalScrollModeProperty = InitializeDependencyProperty( L"HorizontalScrollMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(Scroller::s_defaultHorizontalScrollMode), + ValueHelper::BoxValueIfNecessary(Scroller::s_defaultHorizontalScrollMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_HorizontalScrollRailingModeProperty) @@ -127,10 +127,10 @@ void ScrollerProperties::EnsureProperties() s_HorizontalScrollRailingModeProperty = InitializeDependencyProperty( L"HorizontalScrollRailingMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(Scroller::s_defaultHorizontalScrollRailingMode), + ValueHelper::BoxValueIfNecessary(Scroller::s_defaultHorizontalScrollRailingMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_InputKindProperty) @@ -138,10 +138,10 @@ void ScrollerProperties::EnsureProperties() s_InputKindProperty = InitializeDependencyProperty( L"InputKind", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(Scroller::s_defaultInputKind), + ValueHelper::BoxValueIfNecessary(Scroller::s_defaultInputKind), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_IsAnchoredAtHorizontalExtentProperty) @@ -226,10 +226,10 @@ void ScrollerProperties::EnsureProperties() s_VerticalScrollChainingModeProperty = InitializeDependencyProperty( L"VerticalScrollChainingMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(Scroller::s_defaultVerticalScrollChainingMode), + ValueHelper::BoxValueIfNecessary(Scroller::s_defaultVerticalScrollChainingMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_VerticalScrollModeProperty) @@ -237,10 +237,10 @@ void ScrollerProperties::EnsureProperties() s_VerticalScrollModeProperty = InitializeDependencyProperty( L"VerticalScrollMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(Scroller::s_defaultVerticalScrollMode), + ValueHelper::BoxValueIfNecessary(Scroller::s_defaultVerticalScrollMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_VerticalScrollRailingModeProperty) @@ -248,10 +248,10 @@ void ScrollerProperties::EnsureProperties() s_VerticalScrollRailingModeProperty = InitializeDependencyProperty( L"VerticalScrollRailingMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(Scroller::s_defaultVerticalScrollRailingMode), + ValueHelper::BoxValueIfNecessary(Scroller::s_defaultVerticalScrollRailingMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_ZoomChainingModeProperty) @@ -259,10 +259,10 @@ void ScrollerProperties::EnsureProperties() s_ZoomChainingModeProperty = InitializeDependencyProperty( L"ZoomChainingMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(Scroller::s_defaultZoomChainingMode), + ValueHelper::BoxValueIfNecessary(Scroller::s_defaultZoomChainingMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } if (!s_ZoomModeProperty) @@ -270,10 +270,10 @@ void ScrollerProperties::EnsureProperties() s_ZoomModeProperty = InitializeDependencyProperty( L"ZoomMode", - winrt::name_of(), + winrt::name_of(), winrt::name_of(), false /* isAttached */, - ValueHelper::BoxValueIfNecessary(Scroller::s_defaultZoomMode), + ValueHelper::BoxValueIfNecessary(Scroller::s_defaultZoomMode), winrt::PropertyChangedCallback(&OnPropertyChanged)); } } @@ -365,24 +365,24 @@ winrt::UIElement ScrollerProperties::Child() return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ChildProperty)); } -void ScrollerProperties::ComputedHorizontalScrollMode(winrt::ScrollerScrollMode const& value) +void ScrollerProperties::ComputedHorizontalScrollMode(winrt::ScrollMode const& value) { - static_cast(this)->SetValue(s_ComputedHorizontalScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_ComputedHorizontalScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerScrollMode ScrollerProperties::ComputedHorizontalScrollMode() +winrt::ScrollMode ScrollerProperties::ComputedHorizontalScrollMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ComputedHorizontalScrollModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ComputedHorizontalScrollModeProperty)); } -void ScrollerProperties::ComputedVerticalScrollMode(winrt::ScrollerScrollMode const& value) +void ScrollerProperties::ComputedVerticalScrollMode(winrt::ScrollMode const& value) { - static_cast(this)->SetValue(s_ComputedVerticalScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_ComputedVerticalScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerScrollMode ScrollerProperties::ComputedVerticalScrollMode() +winrt::ScrollMode ScrollerProperties::ComputedVerticalScrollMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ComputedVerticalScrollModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ComputedVerticalScrollModeProperty)); } void ScrollerProperties::HorizontalAnchorRatio(double value) @@ -396,44 +396,44 @@ double ScrollerProperties::HorizontalAnchorRatio() return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_HorizontalAnchorRatioProperty)); } -void ScrollerProperties::HorizontalScrollChainingMode(winrt::ScrollerChainingMode const& value) +void ScrollerProperties::HorizontalScrollChainingMode(winrt::ChainingMode const& value) { - static_cast(this)->SetValue(s_HorizontalScrollChainingModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_HorizontalScrollChainingModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerChainingMode ScrollerProperties::HorizontalScrollChainingMode() +winrt::ChainingMode ScrollerProperties::HorizontalScrollChainingMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_HorizontalScrollChainingModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_HorizontalScrollChainingModeProperty)); } -void ScrollerProperties::HorizontalScrollMode(winrt::ScrollerScrollMode const& value) +void ScrollerProperties::HorizontalScrollMode(winrt::ScrollMode const& value) { - static_cast(this)->SetValue(s_HorizontalScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_HorizontalScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerScrollMode ScrollerProperties::HorizontalScrollMode() +winrt::ScrollMode ScrollerProperties::HorizontalScrollMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_HorizontalScrollModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_HorizontalScrollModeProperty)); } -void ScrollerProperties::HorizontalScrollRailingMode(winrt::ScrollerRailingMode const& value) +void ScrollerProperties::HorizontalScrollRailingMode(winrt::RailingMode const& value) { - static_cast(this)->SetValue(s_HorizontalScrollRailingModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_HorizontalScrollRailingModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerRailingMode ScrollerProperties::HorizontalScrollRailingMode() +winrt::RailingMode ScrollerProperties::HorizontalScrollRailingMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_HorizontalScrollRailingModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_HorizontalScrollRailingModeProperty)); } -void ScrollerProperties::InputKind(winrt::ScrollerInputKind const& value) +void ScrollerProperties::InputKind(winrt::InputKind const& value) { - static_cast(this)->SetValue(s_InputKindProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_InputKindProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerInputKind ScrollerProperties::InputKind() +winrt::InputKind ScrollerProperties::InputKind() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_InputKindProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_InputKindProperty)); } void ScrollerProperties::IsAnchoredAtHorizontalExtent(bool value) @@ -509,54 +509,54 @@ double ScrollerProperties::VerticalAnchorRatio() return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_VerticalAnchorRatioProperty)); } -void ScrollerProperties::VerticalScrollChainingMode(winrt::ScrollerChainingMode const& value) +void ScrollerProperties::VerticalScrollChainingMode(winrt::ChainingMode const& value) { - static_cast(this)->SetValue(s_VerticalScrollChainingModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_VerticalScrollChainingModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerChainingMode ScrollerProperties::VerticalScrollChainingMode() +winrt::ChainingMode ScrollerProperties::VerticalScrollChainingMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_VerticalScrollChainingModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_VerticalScrollChainingModeProperty)); } -void ScrollerProperties::VerticalScrollMode(winrt::ScrollerScrollMode const& value) +void ScrollerProperties::VerticalScrollMode(winrt::ScrollMode const& value) { - static_cast(this)->SetValue(s_VerticalScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_VerticalScrollModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerScrollMode ScrollerProperties::VerticalScrollMode() +winrt::ScrollMode ScrollerProperties::VerticalScrollMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_VerticalScrollModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_VerticalScrollModeProperty)); } -void ScrollerProperties::VerticalScrollRailingMode(winrt::ScrollerRailingMode const& value) +void ScrollerProperties::VerticalScrollRailingMode(winrt::RailingMode const& value) { - static_cast(this)->SetValue(s_VerticalScrollRailingModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_VerticalScrollRailingModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerRailingMode ScrollerProperties::VerticalScrollRailingMode() +winrt::RailingMode ScrollerProperties::VerticalScrollRailingMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_VerticalScrollRailingModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_VerticalScrollRailingModeProperty)); } -void ScrollerProperties::ZoomChainingMode(winrt::ScrollerChainingMode const& value) +void ScrollerProperties::ZoomChainingMode(winrt::ChainingMode const& value) { - static_cast(this)->SetValue(s_ZoomChainingModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_ZoomChainingModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerChainingMode ScrollerProperties::ZoomChainingMode() +winrt::ChainingMode ScrollerProperties::ZoomChainingMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ZoomChainingModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ZoomChainingModeProperty)); } -void ScrollerProperties::ZoomMode(winrt::ScrollerZoomMode const& value) +void ScrollerProperties::ZoomMode(winrt::ZoomMode const& value) { - static_cast(this)->SetValue(s_ZoomModeProperty, ValueHelper::BoxValueIfNecessary(value)); + static_cast(this)->SetValue(s_ZoomModeProperty, ValueHelper::BoxValueIfNecessary(value)); } -winrt::ScrollerZoomMode ScrollerProperties::ZoomMode() +winrt::ZoomMode ScrollerProperties::ZoomMode() { - return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ZoomModeProperty)); + return ValueHelper::CastOrUnbox(static_cast(this)->GetValue(s_ZoomModeProperty)); } winrt::event_token ScrollerProperties::AnchorRequested(winrt::TypedEventHandler const& value) diff --git a/dev/Generated/Scroller.properties.h b/dev/Generated/Scroller.properties.h index e1f8ae783a..e270a473a8 100644 --- a/dev/Generated/Scroller.properties.h +++ b/dev/Generated/Scroller.properties.h @@ -15,26 +15,26 @@ class ScrollerProperties void Child(winrt::UIElement const& value); winrt::UIElement Child(); - void ComputedHorizontalScrollMode(winrt::ScrollerScrollMode const& value); - winrt::ScrollerScrollMode ComputedHorizontalScrollMode(); + void ComputedHorizontalScrollMode(winrt::ScrollMode const& value); + winrt::ScrollMode ComputedHorizontalScrollMode(); - void ComputedVerticalScrollMode(winrt::ScrollerScrollMode const& value); - winrt::ScrollerScrollMode ComputedVerticalScrollMode(); + void ComputedVerticalScrollMode(winrt::ScrollMode const& value); + winrt::ScrollMode ComputedVerticalScrollMode(); void HorizontalAnchorRatio(double value); double HorizontalAnchorRatio(); - void HorizontalScrollChainingMode(winrt::ScrollerChainingMode const& value); - winrt::ScrollerChainingMode HorizontalScrollChainingMode(); + void HorizontalScrollChainingMode(winrt::ChainingMode const& value); + winrt::ChainingMode HorizontalScrollChainingMode(); - void HorizontalScrollMode(winrt::ScrollerScrollMode const& value); - winrt::ScrollerScrollMode HorizontalScrollMode(); + void HorizontalScrollMode(winrt::ScrollMode const& value); + winrt::ScrollMode HorizontalScrollMode(); - void HorizontalScrollRailingMode(winrt::ScrollerRailingMode const& value); - winrt::ScrollerRailingMode HorizontalScrollRailingMode(); + void HorizontalScrollRailingMode(winrt::RailingMode const& value); + winrt::RailingMode HorizontalScrollRailingMode(); - void InputKind(winrt::ScrollerInputKind const& value); - winrt::ScrollerInputKind InputKind(); + void InputKind(winrt::InputKind const& value); + winrt::InputKind InputKind(); void IsAnchoredAtHorizontalExtent(bool value); bool IsAnchoredAtHorizontalExtent(); @@ -57,20 +57,20 @@ class ScrollerProperties void VerticalAnchorRatio(double value); double VerticalAnchorRatio(); - void VerticalScrollChainingMode(winrt::ScrollerChainingMode const& value); - winrt::ScrollerChainingMode VerticalScrollChainingMode(); + void VerticalScrollChainingMode(winrt::ChainingMode const& value); + winrt::ChainingMode VerticalScrollChainingMode(); - void VerticalScrollMode(winrt::ScrollerScrollMode const& value); - winrt::ScrollerScrollMode VerticalScrollMode(); + void VerticalScrollMode(winrt::ScrollMode const& value); + winrt::ScrollMode VerticalScrollMode(); - void VerticalScrollRailingMode(winrt::ScrollerRailingMode const& value); - winrt::ScrollerRailingMode VerticalScrollRailingMode(); + void VerticalScrollRailingMode(winrt::RailingMode const& value); + winrt::RailingMode VerticalScrollRailingMode(); - void ZoomChainingMode(winrt::ScrollerChainingMode const& value); - winrt::ScrollerChainingMode ZoomChainingMode(); + void ZoomChainingMode(winrt::ChainingMode const& value); + winrt::ChainingMode ZoomChainingMode(); - void ZoomMode(winrt::ScrollerZoomMode const& value); - winrt::ScrollerZoomMode ZoomMode(); + void ZoomMode(winrt::ZoomMode const& value); + winrt::ZoomMode ZoomMode(); static winrt::DependencyProperty BackgroundProperty() { return s_BackgroundProperty; } static winrt::DependencyProperty ChildProperty() { return s_ChildProperty; } diff --git a/dev/ParallaxView/APITests/ParallaxViewTests.cs b/dev/ParallaxView/APITests/ParallaxViewTests.cs index 3063713ed5..08d06d8e0d 100644 --- a/dev/ParallaxView/APITests/ParallaxViewTests.cs +++ b/dev/ParallaxView/APITests/ParallaxViewTests.cs @@ -37,7 +37,7 @@ using ScrollerViewChangeKind = Microsoft.UI.Xaml.Controls.ScrollerViewChangeKind; using ScrollerViewChangeSnapPointRespect = Microsoft.UI.Xaml.Controls.ScrollerViewChangeSnapPointRespect; using ScrollerViewKind = Microsoft.UI.Xaml.Controls.ScrollerViewKind; -using ScrollerZoomMode = Microsoft.UI.Xaml.Controls.ScrollerZoomMode; +using ZoomMode = Microsoft.UI.Xaml.Controls.ZoomMode; using MUXControlsTestHooks = Microsoft.UI.Private.Controls.MUXControlsTestHooks; using MUXControlsTestHooksLoggingMessageEventArgs = Microsoft.UI.Private.Controls.MUXControlsTestHooksLoggingMessageEventArgs; #endif @@ -440,7 +440,7 @@ public void VerifyParallaxingWithZooming() parallaxView, rectanglePVChild, scrollViewer, rectangleSVChild, parallaxViewLoadedEvent, scrollViewerLoadedEvent); - scrollViewer.ZoomMode = ZoomMode.Enabled; + scrollViewer.ZoomMode = Windows.UI.Xaml.Controls.ZoomMode.Enabled; }); Log.Comment("Waiting for Loaded events"); @@ -1433,7 +1433,7 @@ private void SetupDefaultUIWithScrollViewer( scrollViewer.Height = c_defaultUIScrollViewerHeight; scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden; scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Hidden; - scrollViewer.ZoomMode = ZoomMode.Disabled; + scrollViewer.ZoomMode = Windows.UI.Xaml.Controls.ZoomMode.Disabled; scrollViewer.Content = rectangleSVChild; Verify.IsNotNull(rectanglePVChild); @@ -1506,7 +1506,7 @@ private void SetupDefaultUIWithScroller( } scroller.Width = c_defaultUIScrollerWidth; scroller.Height = c_defaultUIScrollerHeight; - scroller.ZoomMode = ScrollerZoomMode.Disabled; + scroller.ZoomMode = ZoomMode.Disabled; scroller.Child = rectangleScrollerChild; Verify.IsNotNull(rectanglePVChild); @@ -1573,7 +1573,7 @@ private void SetupUIWithParallaxViewInsideScroller( } scroller.Width = c_defaultUIScrollerWidth; scroller.Height = c_defaultUIScrollerHeight; - scroller.ZoomMode = ScrollerZoomMode.Disabled; + scroller.ZoomMode = ZoomMode.Disabled; Grid gridScrollerChild = new Grid(); scroller.Child = gridScrollerChild; @@ -1668,7 +1668,7 @@ private void SetupUIWithParallaxViewInsideScrollViewer( scrollViewer.Height = c_defaultUIScrollViewerHeight; scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden; scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Hidden; - scrollViewer.ZoomMode = ZoomMode.Disabled; + scrollViewer.ZoomMode = Windows.UI.Xaml.Controls.ZoomMode.Disabled; scrollViewer.Content = stackPanelSVChild; if (parallaxViewLoadedEvent != null) diff --git a/dev/ParallaxView/ScrollInputHelper.cpp b/dev/ParallaxView/ScrollInputHelper.cpp index 487d3f8d85..45c33d77e9 100644 --- a/dev/ParallaxView/ScrollInputHelper.cpp +++ b/dev/ParallaxView/ScrollInputHelper.cpp @@ -284,7 +284,7 @@ winrt::VerticalAlignment ScrollInputHelper::GetEffectiveVerticalAlignment() cons } // Returns the effective zoom mode of the ScrollViewer. -winrt::ZoomMode ScrollInputHelper::GetEffectiveZoomMode() const +winrt::FxZoomMode ScrollInputHelper::GetEffectiveZoomMode() const { if (m_isScrollViewerInDirectManipulation) { @@ -304,7 +304,7 @@ void ScrollInputHelper::UpdateOutOfBoundsPanSize() double viewportWith = GetViewportSize(winrt::Orientation::Horizontal); double viewportHeight = GetViewportSize(winrt::Orientation::Vertical); - if (m_scrollViewer && GetEffectiveZoomMode() == winrt::ZoomMode::Disabled) + if (m_scrollViewer && GetEffectiveZoomMode() == winrt::FxZoomMode::Disabled) { // A ScrollViewer can under/overpan up to 10% of its viewport size m_outOfBoundsPanSize.Width = static_cast(0.1 * viewportWith); @@ -803,9 +803,9 @@ winrt::VerticalAlignment ScrollInputHelper::ComputeVerticalContentAlignment() co return verticalAlignment; } -winrt::ZoomMode ScrollInputHelper::ComputeZoomMode() const +winrt::FxZoomMode ScrollInputHelper::ComputeZoomMode() const { - return m_scrollViewer ? m_scrollViewer.get().ZoomMode() : winrt::ZoomMode::Disabled; + return m_scrollViewer ? m_scrollViewer.get().ZoomMode() : winrt::FxZoomMode::Disabled; } // Determines whether the ScrollViewer's ScrollContentPresenter is the IScrollInfo implementer used by the ScrollViewer. @@ -1170,7 +1170,7 @@ void ScrollInputHelper::OnScrollViewerDirectManipulationCompleted(const winrt::I winrt::HorizontalAlignment oldEffectiveHorizontalAlignment = winrt::HorizontalAlignment::Left; winrt::VerticalAlignment oldEffectiveVerticalAlignment = winrt::VerticalAlignment::Top; - winrt::ZoomMode oldZoomMode = winrt::ZoomMode::Disabled; + winrt::FxZoomMode oldZoomMode = winrt::FxZoomMode::Disabled; if (m_targetElement) { @@ -1183,7 +1183,7 @@ void ScrollInputHelper::OnScrollViewerDirectManipulationCompleted(const winrt::I if (m_targetElement) { - winrt::ZoomMode newZoomMode = GetEffectiveZoomMode(); + winrt::FxZoomMode newZoomMode = GetEffectiveZoomMode(); if (oldZoomMode != newZoomMode) { diff --git a/dev/ParallaxView/ScrollInputHelper.h b/dev/ParallaxView/ScrollInputHelper.h index 91c3e803d0..da4ad68c6f 100644 --- a/dev/ParallaxView/ScrollInputHelper.h +++ b/dev/ParallaxView/ScrollInputHelper.h @@ -34,7 +34,7 @@ class ScrollInputHelper winrt::UIElement GetScrollContentElement() const; winrt::HorizontalAlignment GetEffectiveHorizontalAlignment() const; winrt::VerticalAlignment GetEffectiveVerticalAlignment() const; - winrt::ZoomMode GetEffectiveZoomMode() const; + winrt::FxZoomMode GetEffectiveZoomMode() const; void SetScrollViewer(const winrt::FxScrollViewer& scrollViewer); void SetScroller(const winrt::Scroller& scroller); @@ -50,7 +50,7 @@ class ScrollInputHelper winrt::HorizontalAlignment ComputeHorizontalContentAlignment() const; winrt::VerticalAlignment ComputeVerticalContentAlignment() const; - winrt::ZoomMode ComputeZoomMode() const; + winrt::FxZoomMode ComputeZoomMode() const; bool IsScrollContentPresenterIScrollInfoProvider() const; @@ -123,7 +123,7 @@ class ScrollInputHelper winrt::ExpressionAnimation m_internalTranslationXExpressionAnimation{ nullptr }; winrt::ExpressionAnimation m_internalTranslationYExpressionAnimation{ nullptr }; winrt::ExpressionAnimation m_internalScaleExpressionAnimation{ nullptr }; - winrt::ZoomMode m_manipulationZoomMode{ winrt::ZoomMode::Disabled }; + winrt::FxZoomMode m_manipulationZoomMode{ winrt::FxZoomMode::Disabled }; winrt::HorizontalAlignment m_manipulationHorizontalAlignment{ winrt::HorizontalAlignment::Stretch }; winrt::VerticalAlignment m_manipulationVerticalAlignment{ winrt::VerticalAlignment::Stretch }; winrt::Size m_viewportSize{ 0.0f, 0.0f }; diff --git a/dev/ParallaxView/TestUI/DynamicPage.xaml b/dev/ParallaxView/TestUI/DynamicPage.xaml index f67fc88b63..33bef95d0c 100644 --- a/dev/ParallaxView/TestUI/DynamicPage.xaml +++ b/dev/ParallaxView/TestUI/DynamicPage.xaml @@ -333,15 +333,15 @@ Disabled - Auto Enabled + Auto Disabled - Auto Enabled + Auto diff --git a/dev/ParallaxView/TestUI/DynamicPage.xaml.cs b/dev/ParallaxView/TestUI/DynamicPage.xaml.cs index 1f99968d68..781944f530 100644 --- a/dev/ParallaxView/TestUI/DynamicPage.xaml.cs +++ b/dev/ParallaxView/TestUI/DynamicPage.xaml.cs @@ -20,11 +20,11 @@ using Scroller = Microsoft.UI.Xaml.Controls.Primitives.Scroller; using ScrollerChangeOffsetsOptions = Microsoft.UI.Xaml.Controls.ScrollerChangeOffsetsOptions; using ScrollerChangeZoomFactorOptions = Microsoft.UI.Xaml.Controls.ScrollerChangeZoomFactorOptions; -using ScrollerScrollMode = Microsoft.UI.Xaml.Controls.ScrollerScrollMode; +using ScrollMode = Microsoft.UI.Xaml.Controls.ScrollMode; using ScrollerViewChangeKind = Microsoft.UI.Xaml.Controls.ScrollerViewChangeKind; using ScrollerViewChangeSnapPointRespect = Microsoft.UI.Xaml.Controls.ScrollerViewChangeSnapPointRespect; using ScrollerViewKind = Microsoft.UI.Xaml.Controls.ScrollerViewKind; -using ScrollerZoomMode = Microsoft.UI.Xaml.Controls.ScrollerZoomMode; +using ZoomMode = Microsoft.UI.Xaml.Controls.ZoomMode; #endif namespace MUXControlsTestApp @@ -643,15 +643,17 @@ private void RefreshHorizontalScrollMode() { switch (this.Scroller.HorizontalScrollMode) { - case ScrollerScrollMode.Disabled: + case ScrollMode.Disabled: this.cmbHorizontalScrollMode.SelectedIndex = 0; break; - case ScrollerScrollMode.Auto: + case ScrollMode.Enabled: this.cmbHorizontalScrollMode.SelectedIndex = 1; break; - case ScrollerScrollMode.Enabled: +#if USE_SCROLLMODE_AUTO + case ScrollMode.Auto: this.cmbHorizontalScrollMode.SelectedIndex = 2; break; +#endif } } else @@ -664,20 +666,24 @@ private void cmbHorizontalScrollMode_SelectionChanged(object sender, SelectionCh { if (this.ScrollViewer != null) { - this.ScrollViewer.HorizontalScrollMode = (ScrollMode)this.cmbHorizontalScrollMode.SelectedIndex; + this.ScrollViewer.HorizontalScrollMode = (Windows.UI.Xaml.Controls.ScrollMode)this.cmbHorizontalScrollMode.SelectedIndex; } else if (this.Scroller != null) { switch (this.cmbHorizontalScrollMode.SelectedIndex) { case 0: - this.Scroller.HorizontalScrollMode = ScrollerScrollMode.Disabled; + this.Scroller.HorizontalScrollMode = ScrollMode.Disabled; break; case 1: - this.Scroller.HorizontalScrollMode = ScrollerScrollMode.Auto; + this.Scroller.HorizontalScrollMode = ScrollMode.Enabled; break; case 2: - this.Scroller.HorizontalScrollMode = ScrollerScrollMode.Enabled; +#if USE_SCROLLMODE_AUTO + this.Scroller.HorizontalScrollMode = ScrollMode.Auto; +#else + this.cmbHorizontalScrollMode.SelectedIndex = this.Scroller.HorizontalScrollMode == ScrollMode.Disabled ? 0 : 1; +#endif break; } } @@ -693,15 +699,17 @@ private void RefreshVerticalScrollMode() { switch (this.Scroller.VerticalScrollMode) { - case ScrollerScrollMode.Disabled: + case ScrollMode.Disabled: this.cmbVerticalScrollMode.SelectedIndex = 0; break; - case ScrollerScrollMode.Auto: + case ScrollMode.Enabled: this.cmbVerticalScrollMode.SelectedIndex = 1; break; - case ScrollerScrollMode.Enabled: +#if USE_SCROLLMODE_AUTO + case ScrollMode.Auto: this.cmbVerticalScrollMode.SelectedIndex = 2; break; +#endif } } else @@ -714,20 +722,24 @@ private void cmbVerticalScrollMode_SelectionChanged(object sender, SelectionChan { if (this.ScrollViewer != null) { - this.ScrollViewer.VerticalScrollMode = (ScrollMode)this.cmbVerticalScrollMode.SelectedIndex; + this.ScrollViewer.VerticalScrollMode = (Windows.UI.Xaml.Controls.ScrollMode)this.cmbVerticalScrollMode.SelectedIndex; } else if (this.Scroller != null) { switch (this.cmbVerticalScrollMode.SelectedIndex) { case 0: - this.Scroller.VerticalScrollMode = ScrollerScrollMode.Disabled; + this.Scroller.VerticalScrollMode = ScrollMode.Disabled; break; case 1: - this.Scroller.VerticalScrollMode = ScrollerScrollMode.Auto; + this.Scroller.VerticalScrollMode = ScrollMode.Enabled; break; case 2: - this.Scroller.VerticalScrollMode = ScrollerScrollMode.Enabled; +#if USE_SCROLLMODE_AUTO + this.Scroller.VerticalScrollMode = ScrollMode.Auto; +#else + this.cmbVerticalScrollMode.SelectedIndex = this.Scroller.VerticalScrollMode == ScrollMode.Disabled ? 0 : 1; +#endif break; } } @@ -743,10 +755,10 @@ private void RefreshZoomMode() { switch (this.Scroller.ZoomMode) { - case ScrollerZoomMode.Disabled: + case ZoomMode.Disabled: this.cmbZoomMode.SelectedIndex = 0; break; - case ScrollerZoomMode.Enabled: + case ZoomMode.Enabled: this.cmbZoomMode.SelectedIndex = 1; break; } @@ -761,17 +773,17 @@ private void cmbZoomMode_SelectionChanged(object sender, SelectionChangedEventAr { if (this.ScrollViewer != null) { - this.ScrollViewer.ZoomMode = (ZoomMode)this.cmbZoomMode.SelectedIndex; + this.ScrollViewer.ZoomMode = (Windows.UI.Xaml.Controls.ZoomMode)this.cmbZoomMode.SelectedIndex; } else if (this.Scroller != null) { switch (this.cmbZoomMode.SelectedIndex) { case 0: - this.Scroller.ZoomMode = ScrollerZoomMode.Disabled; + this.Scroller.ZoomMode = ZoomMode.Disabled; break; case 1: - this.Scroller.ZoomMode = ScrollerZoomMode.Enabled; + this.Scroller.ZoomMode = ZoomMode.Enabled; break; } } @@ -1421,9 +1433,9 @@ private void SetupScroller() this.scroller.Height = 300; this.scroller.Background = new SolidColorBrush(Windows.UI.Colors.Magenta); this.scroller.Margin = new Thickness(6); - this.scroller.HorizontalScrollMode = ScrollerScrollMode.Disabled; - this.scroller.VerticalScrollMode = ScrollerScrollMode.Enabled; - this.scroller.ZoomMode = ScrollerZoomMode.Enabled; + this.scroller.HorizontalScrollMode = ScrollMode.Disabled; + this.scroller.VerticalScrollMode = ScrollMode.Enabled; + this.scroller.ZoomMode = ZoomMode.Enabled; this.scroller.Child = this.rectSC; this.scroller.ViewChanged += Scroller_ViewChanged; this.scroller.SetValue(AutomationProperties.NameProperty, "scroller"); diff --git a/dev/ParallaxView/TestUI/ParallaxViewStackPanelPage.xaml b/dev/ParallaxView/TestUI/ParallaxViewStackPanelPage.xaml index 31875d3b34..02213537e4 100644 --- a/dev/ParallaxView/TestUI/ParallaxViewStackPanelPage.xaml +++ b/dev/ParallaxView/TestUI/ParallaxViewStackPanelPage.xaml @@ -93,8 +93,7 @@ - + diff --git a/dev/ParallaxView/TestUI/SimpleRectanglePage.xaml.cs b/dev/ParallaxView/TestUI/SimpleRectanglePage.xaml.cs index 8c53436ee8..092bb6c820 100644 --- a/dev/ParallaxView/TestUI/SimpleRectanglePage.xaml.cs +++ b/dev/ParallaxView/TestUI/SimpleRectanglePage.xaml.cs @@ -14,7 +14,7 @@ #if !BUILD_WINDOWS using Scroller = Microsoft.UI.Xaml.Controls.Primitives.Scroller; -using ScrollerScrollMode = Microsoft.UI.Xaml.Controls.ScrollerScrollMode; +using ScrollMode = Microsoft.UI.Xaml.Controls.ScrollMode; #endif namespace MUXControlsTestApp @@ -330,8 +330,8 @@ private void SetupScroller() s.Height = 300; s.Background = new SolidColorBrush(Windows.UI.Colors.LightBlue); s.Margin = new Thickness(4); - s.HorizontalScrollMode = ScrollerScrollMode.Enabled; - s.VerticalScrollMode = ScrollerScrollMode.Enabled; + s.HorizontalScrollMode = ScrollMode.Enabled; + s.VerticalScrollMode = ScrollMode.Enabled; s.Child = rectSC; s.ViewChanged += Scroller_ViewChanged; diff --git a/dev/ScrollBar2/APITests/ScrollBar2Tests.cs b/dev/ScrollBar2/APITests/ScrollBar2Tests.cs index feb3dda4f3..5a36c0efbf 100644 --- a/dev/ScrollBar2/APITests/ScrollBar2Tests.cs +++ b/dev/ScrollBar2/APITests/ScrollBar2Tests.cs @@ -15,10 +15,10 @@ using Microsoft.VisualStudio.TestTools.UnitTesting.Logging; #endif -using ScrollerScrollMode = Microsoft.UI.Xaml.Controls.ScrollerScrollMode; +using ScrollMode = Microsoft.UI.Xaml.Controls.ScrollMode; using ScrollBar2 = Microsoft.UI.Xaml.Controls.ScrollBar2; using IScrollController = Microsoft.UI.Xaml.Controls.Primitives.IScrollController; -using ScrollerRailingMode = Microsoft.UI.Xaml.Controls.ScrollerRailingMode; +using RailingMode = Microsoft.UI.Xaml.Controls.RailingMode; namespace Windows.UI.Xaml.Tests.MUXControls.ApiTests { @@ -27,7 +27,7 @@ public partial class ScrollBar2Tests { private const ScrollingIndicatorMode c_defaultIndicatorMode = ScrollingIndicatorMode.None; private const Orientation c_defaultOrientation = Orientation.Vertical; - private const ScrollerScrollMode c_defaultScrollMode = ScrollerScrollMode.Disabled; + private const ScrollMode c_defaultScrollMode = ScrollMode.Disabled; private const double c_defaultOffset = 0.0; private const double c_defaultMinOffset = 0.0; private const double c_defaultMaxOffset = 100.0; @@ -70,7 +70,7 @@ public void VerifyPropertyGettersAndSetters() Log.Comment("Setting ScrollBar2 properties to non-default values"); scrollBar2.IndicatorMode = ScrollingIndicatorMode.TouchIndicator; scrollBar2.Orientation = Orientation.Horizontal; - scrollBar2.ScrollMode = ScrollerScrollMode.Disabled; + scrollBar2.ScrollMode = ScrollMode.Disabled; scrollBar2.IsEnabled = !c_defaultIsEnabled; }); @@ -81,7 +81,7 @@ public void VerifyPropertyGettersAndSetters() Log.Comment("Verifying ScrollBar2 non-default property values"); Verify.AreEqual(scrollBar2.IndicatorMode, ScrollingIndicatorMode.TouchIndicator); Verify.AreEqual(scrollBar2.Orientation, Orientation.Horizontal); - Verify.AreEqual(scrollBar2.ScrollMode, ScrollerScrollMode.Disabled); + Verify.AreEqual(scrollBar2.ScrollMode, ScrollMode.Disabled); Verify.AreEqual(scrollBar2.IsEnabled, !c_defaultIsEnabled); }); } @@ -102,7 +102,7 @@ public void VerifyScrollControllerImplementation() Verify.IsTrue(scrollBar2AsIScrollController.AreScrollerInteractionsAllowed); Verify.IsNull(scrollBar2AsIScrollController.InteractionVisual); Verify.AreEqual(scrollBar2AsIScrollController.InteractionVisualScrollOrientation, c_defaultOrientation); - Verify.AreEqual(scrollBar2AsIScrollController.InteractionVisualScrollRailingMode, ScrollerRailingMode.Enabled); + Verify.AreEqual(scrollBar2AsIScrollController.InteractionVisualScrollRailingMode, RailingMode.Enabled); Verify.IsFalse(scrollBar2AsIScrollController.IsInteracting); Log.Comment("Invoking ScrollBar2's IScrollController.SetValues method"); diff --git a/dev/ScrollBar2/ScrollBar2.cpp b/dev/ScrollBar2/ScrollBar2.cpp index 3c855418ce..8670f5cb15 100644 --- a/dev/ScrollBar2/ScrollBar2.cpp +++ b/dev/ScrollBar2/ScrollBar2.cpp @@ -66,10 +66,10 @@ winrt::Orientation ScrollBar2::InteractionVisualScrollOrientation() return Orientation(); } -winrt::ScrollerRailingMode ScrollBar2::InteractionVisualScrollRailingMode() +winrt::RailingMode ScrollBar2::InteractionVisualScrollRailingMode() { // Unused because InteractionVisual returns null. - return winrt::ScrollerRailingMode::Enabled; + return winrt::RailingMode::Enabled; } void ScrollBar2::SetExpressionAnimationSources( @@ -363,7 +363,9 @@ void ScrollBar2::OnPropertyChanged( { SCROLLBAR2_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, s_ScrollModePropertyName); - MUX_ASSERT(unbox_value(args.OldValue()) != winrt::ScrollerScrollMode::Auto); +#ifdef USE_SCROLLMODE_AUTO + MUX_ASSERT(unbox_value(args.OldValue()) != winrt::ScrollMode::Auto); +#endif } #ifdef _DEBUG else @@ -373,12 +375,14 @@ void ScrollBar2::OnPropertyChanged( #endif } -void ScrollBar2::ValidateScrollMode(winrt::ScrollerScrollMode mode) +void ScrollBar2::ValidateScrollMode(winrt::ScrollMode mode) { - if (mode == winrt::ScrollerScrollMode::Auto) +#ifdef USE_SCROLLMODE_AUTO + if (mode == winrt::ScrollMode::Auto) { throw winrt::hresult_error(E_INVALIDARG); } +#endif } void ScrollBar2::CreateAndInitializeScrollBar() @@ -512,7 +516,7 @@ void ScrollBar2::OnScroll( return; } - if (ScrollMode() == winrt::ScrollerScrollMode::Disabled && + if (ScrollMode() == winrt::ScrollMode::Disabled && scrollEventType != winrt::ScrollEventType::ThumbPosition) { // This ScrollBar2 is not interactive. Restore its previous Value. diff --git a/dev/ScrollBar2/ScrollBar2.h b/dev/ScrollBar2/ScrollBar2.h index 08ad60f82e..acf67ff690 100644 --- a/dev/ScrollBar2/ScrollBar2.h +++ b/dev/ScrollBar2/ScrollBar2.h @@ -37,7 +37,7 @@ class ScrollBar2 : static constexpr double s_defaultLargeChange{ std::numeric_limits::quiet_NaN() }; static constexpr bool s_defaultIsEnabled{ true }; static constexpr winrt::Orientation s_defaultOrientation{ winrt::Orientation::Vertical }; - static constexpr winrt::ScrollerScrollMode s_defaultScrollMode{ winrt::ScrollerScrollMode::Disabled }; + static constexpr winrt::ScrollMode s_defaultScrollMode{ winrt::ScrollMode::Disabled }; static constexpr winrt::ScrollingIndicatorMode s_defaultIndicatorMode{ winrt::ScrollingIndicatorMode::None }; #pragma region IFrameworkElementOverridesHelper @@ -55,7 +55,7 @@ class ScrollBar2 : winrt::Orientation InteractionVisualScrollOrientation(); - winrt::ScrollerRailingMode InteractionVisualScrollRailingMode(); + winrt::RailingMode InteractionVisualScrollRailingMode(); void SetExpressionAnimationSources( winrt::CompositionPropertySet const& propertySet, @@ -96,7 +96,7 @@ class ScrollBar2 : void OnPropertyChanged( const winrt::DependencyPropertyChangedEventArgs& args); - static void ValidateScrollMode(winrt::ScrollerScrollMode mode); + static void ValidateScrollMode(winrt::ScrollMode mode); private: #ifdef _DEBUG diff --git a/dev/ScrollBar2/ScrollBar2.idl b/dev/ScrollBar2/ScrollBar2.idl index 6620f63e92..09a91f17dc 100644 --- a/dev/ScrollBar2/ScrollBar2.idl +++ b/dev/ScrollBar2/ScrollBar2.idl @@ -26,7 +26,7 @@ unsealed runtimeclass ScrollBar2 : Windows.UI.Xaml.FrameworkElement Windows.UI.Xaml.Style ScrollBarStyle { get; set; }; [MUX_DEFAULT_VALUE("ScrollBar2::s_defaultScrollMode")] [MUX_PROPERTY_VALIDATION_CALLBACK("ValidateScrollMode")] - ScrollerScrollMode ScrollMode { get; set; }; + ScrollMode ScrollMode { get; set; }; static Windows.UI.Xaml.DependencyProperty MinOffsetProperty { get; }; static Windows.UI.Xaml.DependencyProperty MaxOffsetProperty { get; }; diff --git a/dev/ScrollBar2/TestUI/ScrollBar2DynamicPage.xaml.cs b/dev/ScrollBar2/TestUI/ScrollBar2DynamicPage.xaml.cs index 782482cb45..cfd5161aec 100644 --- a/dev/ScrollBar2/TestUI/ScrollBar2DynamicPage.xaml.cs +++ b/dev/ScrollBar2/TestUI/ScrollBar2DynamicPage.xaml.cs @@ -9,7 +9,7 @@ using Windows.UI.Xaml.Controls.Primitives; using IScrollController = Microsoft.UI.Xaml.Controls.Primitives.IScrollController; -using ScrollerScrollMode = Microsoft.UI.Xaml.Controls.ScrollerScrollMode; +using ScrollMode = Microsoft.UI.Xaml.Controls.ScrollMode; using ScrollerViewChangeResult = Microsoft.UI.Xaml.Controls.ScrollerViewChangeResult; using ScrollControllerInteractionRequestedEventArgs = Microsoft.UI.Xaml.Controls.Primitives.ScrollControllerInteractionRequestedEventArgs; using ScrollControllerOffsetChangeRequestedEventArgs = Microsoft.UI.Xaml.Controls.Primitives.ScrollControllerOffsetChangeRequestedEventArgs; @@ -221,7 +221,7 @@ private void BtnSetScrollMode_Click(object sender, RoutedEventArgs e) { try { - scrollBar2.ScrollMode = (ScrollerScrollMode)cmbScrollMode.SelectedIndex; + scrollBar2.ScrollMode = (ScrollMode)cmbScrollMode.SelectedIndex; } catch (Exception ex) { diff --git a/dev/ScrollViewer/APITests/ScrollViewerTests.cs b/dev/ScrollViewer/APITests/ScrollViewerTests.cs index 92027cdfa9..88b386237b 100644 --- a/dev/ScrollViewer/APITests/ScrollViewerTests.cs +++ b/dev/ScrollViewer/APITests/ScrollViewerTests.cs @@ -22,11 +22,11 @@ #endif using ScrollViewer = Microsoft.UI.Xaml.Controls.ScrollViewer; -using ScrollerScrollMode = Microsoft.UI.Xaml.Controls.ScrollerScrollMode; -using ScrollerInputKind = Microsoft.UI.Xaml.Controls.ScrollerInputKind; -using ScrollerChainingMode = Microsoft.UI.Xaml.Controls.ScrollerChainingMode; -using ScrollerRailingMode = Microsoft.UI.Xaml.Controls.ScrollerRailingMode; -using ScrollerZoomMode = Microsoft.UI.Xaml.Controls.ScrollerZoomMode; +using ScrollMode = Microsoft.UI.Xaml.Controls.ScrollMode; +using InputKind = Microsoft.UI.Xaml.Controls.InputKind; +using ChainingMode = Microsoft.UI.Xaml.Controls.ChainingMode; +using RailingMode = Microsoft.UI.Xaml.Controls.RailingMode; +using ZoomMode = Microsoft.UI.Xaml.Controls.ZoomMode; using MUXControlsTestHooksLoggingMessageEventArgs = Microsoft.UI.Private.Controls.MUXControlsTestHooksLoggingMessageEventArgs; using ScrollViewerTestHooks = Microsoft.UI.Private.Controls.ScrollViewerTestHooks; @@ -38,17 +38,22 @@ public class ScrollViewerTests private const int c_MaxWaitDuration = 5000; private const double c_epsilon = 0.0000001; - private const ScrollerScrollMode c_defaultComputedHorizontalScrollMode = ScrollerScrollMode.Disabled; - private const ScrollerScrollMode c_defaultComputedVerticalScrollMode = ScrollerScrollMode.Disabled; - private const ScrollerInputKind c_defaultInputKind = ScrollerInputKind.All; - private const ScrollerChainingMode c_defaultHorizontalScrollChainingMode = ScrollerChainingMode.Auto; - private const ScrollerChainingMode c_defaultVerticalScrollChainingMode = ScrollerChainingMode.Auto; - private const ScrollerRailingMode c_defaultHorizontalScrollRailingMode = ScrollerRailingMode.Enabled; - private const ScrollerRailingMode c_defaultVerticalScrollRailingMode = ScrollerRailingMode.Enabled; - private const ScrollerScrollMode c_defaultHorizontalScrollMode = ScrollerScrollMode.Auto; - private const ScrollerScrollMode c_defaultVerticalScrollMode = ScrollerScrollMode.Auto; - private const ScrollerChainingMode c_defaultZoomChainingMode = ScrollerChainingMode.Auto; - private const ScrollerZoomMode c_defaultZoomMode = ScrollerZoomMode.Disabled; + private const ScrollMode c_defaultComputedHorizontalScrollMode = ScrollMode.Disabled; + private const ScrollMode c_defaultComputedVerticalScrollMode = ScrollMode.Disabled; + private const InputKind c_defaultInputKind = InputKind.All; + private const ChainingMode c_defaultHorizontalScrollChainingMode = ChainingMode.Auto; + private const ChainingMode c_defaultVerticalScrollChainingMode = ChainingMode.Auto; + private const RailingMode c_defaultHorizontalScrollRailingMode = RailingMode.Enabled; + private const RailingMode c_defaultVerticalScrollRailingMode = RailingMode.Enabled; +#if USE_SCROLLMODE_AUTO + private const ScrollMode c_defaultHorizontalScrollMode = ScrollMode.Auto; + private const ScrollMode c_defaultVerticalScrollMode = ScrollMode.Auto; +#else + private const ScrollMode c_defaultHorizontalScrollMode = ScrollMode.Enabled; + private const ScrollMode c_defaultVerticalScrollMode = ScrollMode.Enabled; +#endif + private const ChainingMode c_defaultZoomChainingMode = ChainingMode.Auto; + private const ZoomMode c_defaultZoomMode = ZoomMode.Disabled; private const bool c_defaultIsChildAvailableWidthConstrained = true; private const bool c_defaultIsChildAvailableHeightConstrained = false; private const bool c_defaultIsAnchoredAtExtent = true; @@ -141,34 +146,34 @@ public void VerifyScrollerAttachedProperties() RunOnUIThread.Execute(() => { Log.Comment("Setting Scroller-cloned properties to non-default values"); - scrollViewer.InputKind = ScrollerInputKind.MouseWheel | ScrollerInputKind.Pen; + scrollViewer.InputKind = InputKind.MouseWheel | InputKind.Pen; scrollViewer.IsChildAvailableWidthConstrained = !c_defaultIsChildAvailableWidthConstrained; scrollViewer.IsChildAvailableHeightConstrained = !c_defaultIsChildAvailableHeightConstrained; - scrollViewer.HorizontalScrollChainingMode = ScrollerChainingMode.Always; - scrollViewer.VerticalScrollChainingMode = ScrollerChainingMode.Never; - scrollViewer.HorizontalScrollRailingMode = ScrollerRailingMode.Disabled; - scrollViewer.VerticalScrollRailingMode = ScrollerRailingMode.Disabled; - scrollViewer.HorizontalScrollMode = ScrollerScrollMode.Enabled; - scrollViewer.VerticalScrollMode = ScrollerScrollMode.Disabled; - scrollViewer.ZoomMode = ScrollerZoomMode.Enabled; - scrollViewer.ZoomChainingMode = ScrollerChainingMode.Never; + scrollViewer.HorizontalScrollChainingMode = ChainingMode.Always; + scrollViewer.VerticalScrollChainingMode = ChainingMode.Never; + scrollViewer.HorizontalScrollRailingMode = RailingMode.Disabled; + scrollViewer.VerticalScrollRailingMode = RailingMode.Disabled; + scrollViewer.HorizontalScrollMode = ScrollMode.Enabled; + scrollViewer.VerticalScrollMode = ScrollMode.Disabled; + scrollViewer.ZoomMode = ZoomMode.Enabled; + scrollViewer.ZoomChainingMode = ChainingMode.Never; scrollViewer.MinZoomFactor = 2.0; scrollViewer.MaxZoomFactor = 8.0; Log.Comment("Verifying Scroller-cloned non-default properties"); - Verify.AreEqual(scrollViewer.InputKind, ScrollerInputKind.MouseWheel | ScrollerInputKind.Pen); + Verify.AreEqual(scrollViewer.InputKind, InputKind.MouseWheel | InputKind.Pen); Verify.AreEqual(scrollViewer.IsChildAvailableWidthConstrained, !c_defaultIsChildAvailableWidthConstrained); Verify.AreEqual(scrollViewer.IsChildAvailableHeightConstrained, !c_defaultIsChildAvailableHeightConstrained); - Verify.AreEqual(scrollViewer.HorizontalScrollChainingMode, ScrollerChainingMode.Always); - Verify.AreEqual(scrollViewer.VerticalScrollChainingMode, ScrollerChainingMode.Never); - Verify.AreEqual(scrollViewer.HorizontalScrollRailingMode, ScrollerRailingMode.Disabled); - Verify.AreEqual(scrollViewer.VerticalScrollRailingMode, ScrollerRailingMode.Disabled); - Verify.AreEqual(scrollViewer.HorizontalScrollMode, ScrollerScrollMode.Enabled); - Verify.AreEqual(scrollViewer.VerticalScrollMode, ScrollerScrollMode.Disabled); - Verify.AreEqual(scrollViewer.ComputedHorizontalScrollMode, ScrollerScrollMode.Enabled); - Verify.AreEqual(scrollViewer.ComputedVerticalScrollMode, ScrollerScrollMode.Disabled); - Verify.AreEqual(scrollViewer.ZoomMode, ScrollerZoomMode.Enabled); - Verify.AreEqual(scrollViewer.ZoomChainingMode, ScrollerChainingMode.Never); + Verify.AreEqual(scrollViewer.HorizontalScrollChainingMode, ChainingMode.Always); + Verify.AreEqual(scrollViewer.VerticalScrollChainingMode, ChainingMode.Never); + Verify.AreEqual(scrollViewer.HorizontalScrollRailingMode, RailingMode.Disabled); + Verify.AreEqual(scrollViewer.VerticalScrollRailingMode, RailingMode.Disabled); + Verify.AreEqual(scrollViewer.HorizontalScrollMode, ScrollMode.Enabled); + Verify.AreEqual(scrollViewer.VerticalScrollMode, ScrollMode.Disabled); + Verify.AreEqual(scrollViewer.ComputedHorizontalScrollMode, ScrollMode.Enabled); + Verify.AreEqual(scrollViewer.ComputedVerticalScrollMode, ScrollMode.Disabled); + Verify.AreEqual(scrollViewer.ZoomMode, ZoomMode.Enabled); + Verify.AreEqual(scrollViewer.ZoomChainingMode, ChainingMode.Never); Verify.IsGreaterThan(scrollViewer.MinZoomFactor, 2.0 - c_epsilon); Verify.IsLessThan(scrollViewer.MinZoomFactor, 2.0 + c_epsilon); Verify.IsGreaterThan(scrollViewer.MaxZoomFactor, 8.0 - c_epsilon); diff --git a/dev/ScrollViewer/ScrollViewer.cpp b/dev/ScrollViewer/ScrollViewer.cpp index 830b48ecb3..0e77298283 100644 --- a/dev/ScrollViewer/ScrollViewer.cpp +++ b/dev/ScrollViewer/ScrollViewer.cpp @@ -103,22 +103,22 @@ winrt::InteractionState ScrollViewer::State() return winrt::InteractionState::Idle; } -winrt::ScrollerInputKind ScrollViewer::InputKind() +winrt::InputKind ScrollViewer::InputKind() { // Workaround for Bug 17377013: XamlCompiler codegen for Enum CreateFromString always returns boxed int which is wrong for [flags] enums (should be uint) // Check if the boxed InputKind is an IReference first in which case we unbox as int. auto boxedKind = GetValue(s_InputKindProperty); if (auto boxedInt = boxedKind.try_as>()) { - return winrt::ScrollerInputKind{ static_cast(unbox_value(boxedInt)) }; + return winrt::InputKind{ static_cast(unbox_value(boxedInt)) }; } return auto_unbox(boxedKind); } -void ScrollViewer::InputKind(winrt::ScrollerInputKind const& value) +void ScrollViewer::InputKind(winrt::InputKind const& value) { - SCROLLVIEWER_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, TypeLogging::ScrollerInputKindToString(value).c_str()); + SCROLLVIEWER_TRACE_INFO(*this, TRACE_MSG_METH_STR, METH_NAME, this, TypeLogging::InputKindToString(value).c_str()); SetValue(s_InputKindProperty, box_value(value)); } @@ -1161,7 +1161,7 @@ void ScrollViewer::UpdateScrollControllersVisibility( unbox_value(GetValue(s_HorizontalScrollBarVisibilityProperty)); if (scrollBarVisibility == winrt::ScrollBarVisibility::Auto && - ComputedHorizontalScrollMode() == winrt::ScrollerScrollMode::Enabled) + ComputedHorizontalScrollMode() == winrt::ScrollMode::Enabled) { isHorizontalScrollControllerVisible = true; } @@ -1189,7 +1189,7 @@ void ScrollViewer::UpdateScrollControllersVisibility( unbox_value(GetValue(s_VerticalScrollBarVisibilityProperty)); if (scrollBarVisibility == winrt::ScrollBarVisibility::Auto && - ComputedVerticalScrollMode() == winrt::ScrollerScrollMode::Enabled) + ComputedVerticalScrollMode() == winrt::ScrollMode::Enabled) { isVerticalScrollControllerVisible = true; } @@ -1592,7 +1592,7 @@ bool ScrollViewer::DoScrollForKey(winrt::VirtualKey key, double scrollProportion else if (key == winrt::VirtualKey::Home) { bool canScrollUp = CanScrollUp(); - if (canScrollUp || (ComputedVerticalScrollMode() == winrt::ScrollerScrollMode::Disabled && CanScrollLeft())) + if (canScrollUp || (ComputedVerticalScrollMode() == winrt::ScrollMode::Disabled && CanScrollLeft())) { isScrollTriggered = true; auto horizontalOffset = canScrollUp ? scroller.HorizontalOffset() : 0.0; @@ -1610,7 +1610,7 @@ bool ScrollViewer::DoScrollForKey(winrt::VirtualKey key, double scrollProportion else if (key == winrt::VirtualKey::End) { bool canScrollDown = CanScrollDown(); - if (canScrollDown || (ComputedVerticalScrollMode() == winrt::ScrollerScrollMode::Disabled && CanScrollRight())) + if (canScrollDown || (ComputedVerticalScrollMode() == winrt::ScrollMode::Disabled && CanScrollRight())) { isScrollTriggered = true; auto zoomedExtent = (canScrollDown ? scroller.ExtentHeight() : scroller.ExtentWidth()) * scroller.ZoomFactor(); @@ -1732,7 +1732,7 @@ bool ScrollViewer::CanScrollVerticallyInDirection(bool inPositiveDirection) if (m_scroller) { auto scroller = m_scroller.get().as(); - if (ComputedVerticalScrollMode() == winrt::ScrollerScrollMode::Enabled) + if (ComputedVerticalScrollMode() == winrt::ScrollMode::Enabled) { auto zoomedExtentHeight = scroller.ExtentHeight() * scroller.ZoomFactor(); auto viewportHeight = scroller.ActualHeight(); @@ -1772,7 +1772,7 @@ bool ScrollViewer::CanScrollHorizontallyInDirection(bool inPositiveDirection) if (m_scroller) { auto scroller = m_scroller.get().as(); - if (ComputedHorizontalScrollMode() == winrt::ScrollerScrollMode::Enabled) + if (ComputedHorizontalScrollMode() == winrt::ScrollMode::Enabled) { auto zoomedExtentWidth = scroller.ExtentWidth() * scroller.ZoomFactor(); auto viewportWidth = scroller.ActualWidth(); diff --git a/dev/ScrollViewer/ScrollViewer.h b/dev/ScrollViewer/ScrollViewer.h index d9602a5edc..1d34526d00 100644 --- a/dev/ScrollViewer/ScrollViewer.h +++ b/dev/ScrollViewer/ScrollViewer.h @@ -19,17 +19,22 @@ class ScrollViewer : // Properties' default values. static const winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility s_defaultHorizontalScrollBarVisibility{ winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility::Auto }; static const winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility s_defaultVerticalScrollBarVisibility{ winrt::Microsoft::UI::Xaml::Controls::ScrollBarVisibility::Auto }; - static const winrt::ScrollerChainingMode s_defaultHorizontalScrollChainingMode{ winrt::ScrollerChainingMode::Auto }; - static const winrt::ScrollerChainingMode s_defaultVerticalScrollChainingMode{ winrt::ScrollerChainingMode::Auto }; - static const winrt::ScrollerRailingMode s_defaultHorizontalScrollRailingMode{ winrt::ScrollerRailingMode::Enabled }; - static const winrt::ScrollerRailingMode s_defaultVerticalScrollRailingMode{ winrt::ScrollerRailingMode::Enabled }; - static const winrt::ScrollerScrollMode s_defaultHorizontalScrollMode{ winrt::ScrollerScrollMode::Auto }; - static const winrt::ScrollerScrollMode s_defaultVerticalScrollMode{ winrt::ScrollerScrollMode::Auto }; - static const winrt::ScrollerScrollMode s_defaultComputedHorizontalScrollMode{ winrt::ScrollerScrollMode::Disabled }; - static const winrt::ScrollerScrollMode s_defaultComputedVerticalScrollMode{ winrt::ScrollerScrollMode::Disabled }; - static const winrt::ScrollerChainingMode s_defaultZoomChainingMode{ winrt::ScrollerChainingMode::Auto }; - static const winrt::ScrollerZoomMode s_defaultZoomMode{ winrt::ScrollerZoomMode::Disabled }; - static const winrt::ScrollerInputKind s_defaultInputKind{ winrt::ScrollerInputKind::All }; + static const winrt::ChainingMode s_defaultHorizontalScrollChainingMode{ winrt::ChainingMode::Auto }; + static const winrt::ChainingMode s_defaultVerticalScrollChainingMode{ winrt::ChainingMode::Auto }; + static const winrt::RailingMode s_defaultHorizontalScrollRailingMode{ winrt::RailingMode::Enabled }; + static const winrt::RailingMode s_defaultVerticalScrollRailingMode{ winrt::RailingMode::Enabled }; +#ifdef USE_SCROLLMODE_AUTO + static const winrt::ScrollMode s_defaultHorizontalScrollMode{ winrt::ScrollMode::Auto }; + static const winrt::ScrollMode s_defaultVerticalScrollMode{ winrt::ScrollMode::Auto }; +#else + static const winrt::ScrollMode s_defaultHorizontalScrollMode{ winrt::ScrollMode::Enabled }; + static const winrt::ScrollMode s_defaultVerticalScrollMode{ winrt::ScrollMode::Enabled }; +#endif + static const winrt::ScrollMode s_defaultComputedHorizontalScrollMode{ winrt::ScrollMode::Disabled }; + static const winrt::ScrollMode s_defaultComputedVerticalScrollMode{ winrt::ScrollMode::Disabled }; + static const winrt::ChainingMode s_defaultZoomChainingMode{ winrt::ChainingMode::Auto }; + static const winrt::ZoomMode s_defaultZoomMode{ winrt::ZoomMode::Disabled }; + static const winrt::InputKind s_defaultInputKind{ winrt::InputKind::All }; static constexpr bool s_defaultIsChildAvailableWidthConstrained{ true }; static constexpr bool s_defaultIsChildAvailableHeightConstrained{ false }; static constexpr double s_defaultMinZoomFactor{ 0.1 }; @@ -53,8 +58,8 @@ class ScrollViewer : winrt::InteractionState State(); - winrt::ScrollerInputKind InputKind(); - void InputKind(winrt::ScrollerInputKind const& value); + winrt::InputKind InputKind(); + void InputKind(winrt::InputKind const& value); int32_t ChangeOffsets(winrt::ScrollerChangeOffsetsOptions const& options); int32_t ChangeOffsetsWithAdditionalVelocity(winrt::ScrollerChangeOffsetsWithAdditionalVelocityOptions const& options); diff --git a/dev/ScrollViewer/ScrollViewer.idl b/dev/ScrollViewer/ScrollViewer.idl index 6d96211b61..4ea41e28c2 100644 --- a/dev/ScrollViewer/ScrollViewer.idl +++ b/dev/ScrollViewer/ScrollViewer.idl @@ -34,27 +34,27 @@ unsealed runtimeclass ScrollViewer : Windows.UI.Xaml.Controls.Control [MUX_DEFAULT_VALUE("ScrollViewer::s_defaultIsChildAvailableHeightConstrained")] Boolean IsChildAvailableHeightConstrained { get; set; }; [MUX_DEFAULT_VALUE("ScrollViewer::s_defaultHorizontalScrollChainingMode")] - ScrollerChainingMode HorizontalScrollChainingMode { get; set; }; + ChainingMode HorizontalScrollChainingMode { get; set; }; [MUX_DEFAULT_VALUE("ScrollViewer::s_defaultVerticalScrollChainingMode")] - ScrollerChainingMode VerticalScrollChainingMode { get; set; }; + ChainingMode VerticalScrollChainingMode { get; set; }; [MUX_DEFAULT_VALUE("ScrollViewer::s_defaultHorizontalScrollRailingMode")] - ScrollerRailingMode HorizontalScrollRailingMode { get; set; }; + RailingMode HorizontalScrollRailingMode { get; set; }; [MUX_DEFAULT_VALUE("ScrollViewer::s_defaultVerticalScrollRailingMode")] - ScrollerRailingMode VerticalScrollRailingMode { get; set; }; + RailingMode VerticalScrollRailingMode { get; set; }; [MUX_DEFAULT_VALUE("ScrollViewer::s_defaultHorizontalScrollMode")] - ScrollerScrollMode HorizontalScrollMode { get; set; }; + ScrollMode HorizontalScrollMode { get; set; }; [MUX_DEFAULT_VALUE("ScrollViewer::s_defaultVerticalScrollMode")] - ScrollerScrollMode VerticalScrollMode { get; set; }; + ScrollMode VerticalScrollMode { get; set; }; [MUX_DEFAULT_VALUE("ScrollViewer::s_defaultComputedHorizontalScrollMode")] - ScrollerScrollMode ComputedHorizontalScrollMode { get; }; + ScrollMode ComputedHorizontalScrollMode { get; }; [MUX_DEFAULT_VALUE("ScrollViewer::s_defaultComputedVerticalScrollMode")] - ScrollerScrollMode ComputedVerticalScrollMode { get; }; + ScrollMode ComputedVerticalScrollMode { get; }; [MUX_DEFAULT_VALUE("ScrollViewer::s_defaultZoomChainingMode")] - ScrollerChainingMode ZoomChainingMode { get; set; }; + ChainingMode ZoomChainingMode { get; set; }; [MUX_DEFAULT_VALUE("ScrollViewer::s_defaultZoomMode")] - ScrollerZoomMode ZoomMode { get; set; }; + ZoomMode ZoomMode { get; set; }; [MUX_DEFAULT_VALUE("ScrollViewer::s_defaultInputKind")] - ScrollerInputKind InputKind { get; set; }; + InputKind InputKind { get; set; }; [MUX_DEFAULT_VALUE("ScrollViewer::s_defaultMinZoomFactor")] [MUX_PROPERTY_VALIDATION_CALLBACK("ValidateZoomFactoryBoundary")] Double MinZoomFactor { get; set; }; diff --git a/dev/ScrollViewer/ScrollViewer.xaml b/dev/ScrollViewer/ScrollViewer.xaml index b1da3aa323..7ca093798b 100644 --- a/dev/ScrollViewer/ScrollViewer.xaml +++ b/dev/ScrollViewer/ScrollViewer.xaml @@ -12,10 +12,10 @@ - + - + diff --git a/dev/ScrollViewer/TestUI/ScrollViewerDynamicPage.xaml b/dev/ScrollViewer/TestUI/ScrollViewerDynamicPage.xaml index 71a8927003..62a67d8e67 100644 --- a/dev/ScrollViewer/TestUI/ScrollViewerDynamicPage.xaml +++ b/dev/ScrollViewer/TestUI/ScrollViewerDynamicPage.xaml @@ -137,16 +137,16 @@ - Visible - Collapsed Auto + Visible + Hidden - Visible - Collapsed Auto + Visible + Hidden diff --git a/dev/ScrollViewer/TestUI/ScrollViewerDynamicPage.xaml.cs b/dev/ScrollViewer/TestUI/ScrollViewerDynamicPage.xaml.cs index 2bfce223a8..7b93d1852b 100644 --- a/dev/ScrollViewer/TestUI/ScrollViewerDynamicPage.xaml.cs +++ b/dev/ScrollViewer/TestUI/ScrollViewerDynamicPage.xaml.cs @@ -14,11 +14,11 @@ using Scroller = Microsoft.UI.Xaml.Controls.Primitives.Scroller; using ScrollViewer = Microsoft.UI.Xaml.Controls.ScrollViewer; -using ScrollerChainingMode = Microsoft.UI.Xaml.Controls.ScrollerChainingMode; -using ScrollerRailingMode = Microsoft.UI.Xaml.Controls.ScrollerRailingMode; -using ScrollerScrollMode = Microsoft.UI.Xaml.Controls.ScrollerScrollMode; -using ScrollerZoomMode = Microsoft.UI.Xaml.Controls.ScrollerZoomMode; -using ScrollerInputKind = Microsoft.UI.Xaml.Controls.ScrollerInputKind; +using ChainingMode = Microsoft.UI.Xaml.Controls.ChainingMode; +using RailingMode = Microsoft.UI.Xaml.Controls.RailingMode; +using ScrollMode = Microsoft.UI.Xaml.Controls.ScrollMode; +using ZoomMode = Microsoft.UI.Xaml.Controls.ZoomMode; +using InputKind = Microsoft.UI.Xaml.Controls.InputKind; using ScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility; using ScrollerChangingOffsetsEventArgs = Microsoft.UI.Xaml.Controls.ScrollerChangingOffsetsEventArgs; using ScrollerChangingZoomFactorEventArgs = Microsoft.UI.Xaml.Controls.ScrollerChangingZoomFactorEventArgs; @@ -190,7 +190,7 @@ private void BtnSetHorizontalScrollMode_Click(object sender, RoutedEventArgs e) { try { - ScrollerScrollMode ssm = (ScrollerScrollMode)cmbHorizontalScrollMode.SelectedIndex; + ScrollMode ssm = (ScrollMode)cmbHorizontalScrollMode.SelectedIndex; scrollViewer.HorizontalScrollMode = ssm; } catch (Exception ex) @@ -204,7 +204,7 @@ private void BtnSetHorizontalScrollChainingMode_Click(object sender, RoutedEvent { try { - ScrollerChainingMode scm = (ScrollerChainingMode)cmbHorizontalScrollChainingMode.SelectedIndex; + ChainingMode scm = (ChainingMode)cmbHorizontalScrollChainingMode.SelectedIndex; scrollViewer.HorizontalScrollChainingMode = scm; } catch (Exception ex) @@ -218,7 +218,7 @@ private void BtnSetHorizontalScrollRailingMode_Click(object sender, RoutedEventA { try { - ScrollerRailingMode srm = (ScrollerRailingMode)cmbHorizontalScrollRailingMode.SelectedIndex; + RailingMode srm = (RailingMode)cmbHorizontalScrollRailingMode.SelectedIndex; scrollViewer.HorizontalScrollRailingMode = srm; } catch (Exception ex) @@ -232,7 +232,7 @@ private void BtnSetVerticalScrollMode_Click(object sender, RoutedEventArgs e) { try { - ScrollerScrollMode ssm = (ScrollerScrollMode)cmbVerticalScrollMode.SelectedIndex; + ScrollMode ssm = (ScrollMode)cmbVerticalScrollMode.SelectedIndex; scrollViewer.VerticalScrollMode = ssm; } catch (Exception ex) @@ -246,7 +246,7 @@ private void BtnSetVerticalScrollChainingMode_Click(object sender, RoutedEventAr { try { - ScrollerChainingMode scm = (ScrollerChainingMode)cmbVerticalScrollChainingMode.SelectedIndex; + ChainingMode scm = (ChainingMode)cmbVerticalScrollChainingMode.SelectedIndex; scrollViewer.VerticalScrollChainingMode = scm; } catch (Exception ex) @@ -260,7 +260,7 @@ private void BtnSetVerticalScrollRailingMode_Click(object sender, RoutedEventArg { try { - ScrollerRailingMode srm = (ScrollerRailingMode)cmbVerticalScrollRailingMode.SelectedIndex; + RailingMode srm = (RailingMode)cmbVerticalScrollRailingMode.SelectedIndex; scrollViewer.VerticalScrollRailingMode = srm; } catch (Exception ex) @@ -274,7 +274,7 @@ private void BtnSetZoomMode_Click(object sender, RoutedEventArgs e) { try { - ScrollerZoomMode ssm = (ScrollerZoomMode)cmbZoomMode.SelectedIndex; + ZoomMode ssm = (ZoomMode)cmbZoomMode.SelectedIndex; scrollViewer.ZoomMode = ssm; } catch (Exception ex) @@ -288,7 +288,7 @@ private void BtnSetZoomChainingMode_Click(object sender, RoutedEventArgs e) { try { - ScrollerChainingMode scm = (ScrollerChainingMode)cmbZoomChainingMode.SelectedIndex; + ChainingMode scm = (ChainingMode)cmbZoomChainingMode.SelectedIndex; scrollViewer.ZoomChainingMode = scm; } catch (Exception ex) @@ -302,33 +302,33 @@ private void BtnSetInputKind_Click(object sender, RoutedEventArgs e) { try { - ScrollerInputKind sik; + InputKind sik; switch (cmbInputKind.SelectedIndex) { case 0: - sik = ScrollerInputKind.All; + sik = InputKind.All; break; case 1: - sik = ScrollerInputKind.Touch; + sik = InputKind.Touch; break; case 2: - sik = ScrollerInputKind.Pen; + sik = InputKind.Pen; break; case 3: - sik = ScrollerInputKind.MouseWheel; + sik = InputKind.MouseWheel; break; case 4: - sik = ScrollerInputKind.Touch | ScrollerInputKind.MouseWheel; + sik = InputKind.Touch | InputKind.MouseWheel; break; case 5: - sik = ScrollerInputKind.Touch | ScrollerInputKind.Pen; + sik = InputKind.Touch | InputKind.Pen; break; case 6: - sik = ScrollerInputKind.Pen | ScrollerInputKind.MouseWheel; + sik = InputKind.Pen | InputKind.MouseWheel; break; default: - sik = ScrollerInputKind.Touch | ScrollerInputKind.Pen | ScrollerInputKind.MouseWheel; + sik = InputKind.Touch | InputKind.Pen | InputKind.MouseWheel; break; } @@ -1143,28 +1143,28 @@ private void UpdateInputKind() { switch (scrollViewer.InputKind) { - case ScrollerInputKind.All: + case InputKind.All: cmbInputKind.SelectedIndex = 0; break; - case ScrollerInputKind.Touch: + case InputKind.Touch: cmbInputKind.SelectedIndex = 1; break; - case ScrollerInputKind.Pen: + case InputKind.Pen: cmbInputKind.SelectedIndex = 2; break; - case ScrollerInputKind.MouseWheel: + case InputKind.MouseWheel: cmbInputKind.SelectedIndex = 3; break; - case ScrollerInputKind.Touch | ScrollerInputKind.MouseWheel: + case InputKind.Touch | InputKind.MouseWheel: cmbInputKind.SelectedIndex = 4; break; - case ScrollerInputKind.Touch | ScrollerInputKind.Pen: + case InputKind.Touch | InputKind.Pen: cmbInputKind.SelectedIndex = 5; break; - case ScrollerInputKind.Pen | ScrollerInputKind.MouseWheel: + case InputKind.Pen | InputKind.MouseWheel: cmbInputKind.SelectedIndex = 6; break; - case ScrollerInputKind.Touch | ScrollerInputKind.Pen | ScrollerInputKind.MouseWheel: + case InputKind.Touch | InputKind.Pen | InputKind.MouseWheel: cmbInputKind.SelectedIndex = 7; break; } diff --git a/dev/ScrollViewer/TestUI/ScrollViewerWithScrollControllersPage.xaml b/dev/ScrollViewer/TestUI/ScrollViewerWithScrollControllersPage.xaml index 7dc7b6f832..7b70a8cf1d 100644 --- a/dev/ScrollViewer/TestUI/ScrollViewerWithScrollControllersPage.xaml +++ b/dev/ScrollViewer/TestUI/ScrollViewerWithScrollControllersPage.xaml @@ -19,10 +19,10 @@ - + - + @@ -184,18 +184,18 @@ - Visible - Collapsed Auto + Visible + Hidden