From a51b7d5371db940ff304d8a3f76a5284917ae9bc Mon Sep 17 00:00:00 2001 From: Keith Mahoney Date: Thu, 22 Jun 2023 12:17:32 -0700 Subject: [PATCH 1/6] Update version to 2.8.5 --- version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.props b/version.props index 26e6578857..0426948c47 100644 --- a/version.props +++ b/version.props @@ -4,7 +4,7 @@ 2 8 - 4 + 5 0 0 From d6033dfb9a08d9d85a12a7758957780c3cdea5cc Mon Sep 17 00:00:00 2001 From: Dmitriy Komin <45051803+DmitriyKomin@users.noreply.github.com> Date: Mon, 12 Jun 2023 21:43:23 -0700 Subject: [PATCH 2/6] Pass OS text scale factor to CoreWebView2 (#8540) Co-authored-by: Dmitriy Komin --- dev/WebView2/WebView2.cpp | 39 +++++++++++++++++++++++++++++++++++---- dev/WebView2/WebView2.h | 11 +++++++++++ 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/dev/WebView2/WebView2.cpp b/dev/WebView2/WebView2.cpp index cf42db8397..a3239b261e 100644 --- a/dev/WebView2/WebView2.cpp +++ b/dev/WebView2/WebView2.cpp @@ -1555,6 +1555,22 @@ void WebView2::TryCompleteInitialization() [this](auto&&, auto&&) { UpdateDefaultVisualBackgroundColor(); }); } + if (!m_textScaleChangedRevoker) + { + m_textScaleChangedRevoker = GetUISettings().TextScaleFactorChanged(winrt::auto_revoke, + [weakThis{ get_weak() }](auto&&, auto&&) + { + if (auto strongThis = weakThis.get()) + { + // OnTextScaleFactorChanged happens in non-UI thread, use dispatcher to call UpdateCoreWebViewScale in UI thread. + strongThis->m_dispatcherHelper.RunAsync([strongThis]() + { + strongThis->UpdateCoreWebViewScale(); + }); + } + }); + } + // WebView2 in WinUI 2 is a ContentControl that either renders its web content to a SpriteVisual, or in the case that // the WebView2 Runtime is not installed, renders a message to that effect as its Content. In the case where the // WebView2 starts with Visibility.Collapsed, hit testing code has trouble seeing the WebView2 if it does not have @@ -1706,6 +1722,15 @@ void WebView2::Reload() } } +void WebView2::UpdateCoreWebViewScale() +{ + if (m_coreWebViewController) + { + auto textScaleFactor = m_uiSettings.TextScaleFactor(); + m_coreWebViewController.RasterizationScale(static_cast(m_rasterizationScale * textScaleFactor)); + } +} + void WebView2::NavigateToString(winrt::hstring htmlContent) { if (m_coreWebView) @@ -1759,10 +1784,7 @@ void WebView2::XamlRootChangedHelper(bool forceUpdate) { m_rasterizationScale = scale; m_isHostVisible = hostVisibility; // If we did forceUpdate we'll want to update host visibility here too - if (m_coreWebViewController) - { - m_coreWebViewController.RasterizationScale(static_cast(scale)); - } + UpdateCoreWebViewScale(); SetCoreWebViewAndVisualSize(static_cast(ActualWidth()), static_cast(ActualHeight())); CheckAndUpdateWebViewPosition(); UpdateRenderedSubscriptionAndVisibility(); @@ -2026,3 +2048,12 @@ void WebView2::ResetProperties() SetCanGoForward(false); SetCanGoBack(false); } + +winrt::UISettings WebView2::GetUISettings() +{ + if (m_uiSettings == nullptr) + { + m_uiSettings = winrt::UISettings(); + } + return m_uiSettings; +} \ No newline at end of file diff --git a/dev/WebView2/WebView2.h b/dev/WebView2/WebView2.h index 1a558cd0f5..0005ec6cc6 100644 --- a/dev/WebView2/WebView2.h +++ b/dev/WebView2/WebView2.h @@ -15,6 +15,8 @@ namespace winrt #include "CoreWebView2InitializedEventArgs.g.h" +#include "DispatcherHelper.h" + #include "WebView2.g.h" #include "WebView2.properties.h" #pragma warning( push ) @@ -88,6 +90,8 @@ class WebView2 : void OnLoaded(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args); void OnUnloaded(winrt::IInspectable const& sender, winrt::RoutedEventArgs const& args); + void UpdateCoreWebViewScale(); + winrt::IAsyncAction EnsureCoreWebView2Async(); winrt::IAsyncOperation ExecuteScriptAsync(winrt::hstring javascriptCode); void Reload(); @@ -175,6 +179,8 @@ class WebView2 : void CloseInternal(bool inShutdownPath); winrt::AccessibilitySettings GetAccessibilitySettings(); + winrt::UISettings GetUISettings(); + bool SafeIsLoaded(); void UpdateCoreWindowCursor(); @@ -244,6 +250,7 @@ class WebView2 : winrt::FrameworkElement::ActualThemeChanged_revoker m_actualThemeChangedRevoker{}; winrt::AccessibilitySettings m_accessibilitySettings; winrt::AccessibilitySettings::HighContrastChanged_revoker m_highContrastChangedRevoker{}; + winrt::UISettings::TextScaleFactorChanged_revoker m_textScaleChangedRevoker{}; // Pointer handling for CoreWindow void ResetPointerHelper(const winrt::PointerRoutedEventArgs& args); @@ -279,6 +286,10 @@ class WebView2 : // Last known position of the host window POINT m_hostWindowPosition{}; + DispatcherHelper m_dispatcherHelper{ *this }; + + winrt::UISettings m_uiSettings; + // Manually delay load functions to avoid WACK exceptions. decltype(&ClientToScreen) m_fnClientToScreen; decltype(&SendMessageW) m_fnSendMessageW; From e30572d2b3516ced7c2c574d5fb9d059a00e8570 Mon Sep 17 00:00:00 2001 From: Dmitriy Komin <45051803+DmitriyKomin@users.noreply.github.com> Date: Wed, 21 Jun 2023 10:08:58 -0700 Subject: [PATCH 3/6] Add const keyword to resolve warnings (treated as errors) C26462 and C26496 (#8567) * Add const keyword as needed to resolve warnings C26462,C26496 * fix typo * few more fixes * add deprecated link * fix pointer in const --------- Co-authored-by: Dmitriy Komin Co-authored-by: Ranjesh Jaganathan <28935693+ranjeshj@users.noreply.github.com> Co-authored-by: Karen Lai --- dev/AutoSuggestBox/AutoSuggestBoxHelper.cpp | 2 +- dev/Breadcrumb/BreadcrumbBarItem.cpp | 2 +- dev/Breadcrumb/BreadcrumbLayout.cpp | 2 +- dev/ColorPicker/ColorPicker.cpp | 4 ++-- dev/ColorPicker/ColorPickerSlider.cpp | 2 +- dev/ColorPicker/ColorSpectrum.cpp | 2 +- dev/ColorPicker/ColorSpectrumAutomationPeer.cpp | 2 +- dev/ComboBox/ComboBoxHelper.cpp | 2 +- .../CommandBarFlyoutCommandBar.cpp | 4 ++-- dev/CommandBarFlyout/TextCommandBarFlyout.cpp | 6 +++--- dev/InfoBar/InfoBarPanel.cpp | 2 +- dev/Lights/MaterialHelper.cpp | 2 +- .../Backdrop/SystemBackdropWindowHandler.cpp | 2 +- dev/Materials/Reveal/RevealBrush.cpp | 8 ++++---- dev/NavigationView/NavigationView.cpp | 12 ++++++------ dev/NavigationView/NavigationViewItem.cpp | 4 ++-- .../NavigationViewItemsFactory.cpp | 2 +- dev/ParallaxView/ScrollInputHelper.cpp | 10 +++++----- dev/PersonPicture/InitialsGenerator.cpp | 2 +- dev/RatingControl/RatingControl.cpp | 10 +++++----- .../RatingControlAutomationPeer.cpp | 10 +++++----- dev/Repeater/ElementManager.cpp | 2 +- dev/Repeater/ItemsRepeater.cpp | 2 +- dev/Repeater/Phaser.cpp | 4 ++-- dev/Repeater/RecyclePool.cpp | 2 +- dev/Repeater/SelectionModel.cpp | 4 ++-- dev/ScrollPresenter/ScrollPresenter.cpp | 2 +- dev/ScrollPresenter/ScrollPresenterAnchoring.cpp | 2 +- dev/ScrollView/ScrollBarController.cpp | 6 +++--- dev/ScrollView/ScrollView.cpp | 4 ++-- dev/SplitButton/SplitButton.cpp | 2 +- dev/SwipeControl/SwipeControl.cpp | 8 ++++---- dev/TabView/TabView.cpp | 16 ++++++++-------- dev/TabView/TabViewItem.cpp | 8 ++++---- dev/TabView/TabViewItemAutomationPeer.cpp | 2 +- dev/TeachingTip/TeachingTip.cpp | 6 +++--- dev/TreeView/TreeViewItem.cpp | 6 +++--- dev/TreeView/TreeViewItemAutomationPeer.cpp | 2 +- dev/TreeView/TreeViewList.cpp | 6 +++--- dev/TreeView/TreeViewNode.cpp | 2 +- dev/TreeView/ViewModel.cpp | 14 +++++++------- dev/inc/DispatcherHelper.h | 2 +- dev/inc/SharedHelpers.h | 2 +- 43 files changed, 98 insertions(+), 98 deletions(-) diff --git a/dev/AutoSuggestBox/AutoSuggestBoxHelper.cpp b/dev/AutoSuggestBox/AutoSuggestBoxHelper.cpp index 8bf211c874..f5d8b209c7 100644 --- a/dev/AutoSuggestBox/AutoSuggestBoxHelper.cpp +++ b/dev/AutoSuggestBox/AutoSuggestBoxHelper.cpp @@ -54,7 +54,7 @@ void AutoSuggestBoxHelper::OnKeepInteriorCornersSquarePropertyChanged( { if (auto autoSuggestBox = sender.try_as()) { - bool shouldMonitorAutoSuggestEvents = unbox_value(args.NewValue()); + const bool shouldMonitorAutoSuggestEvents = unbox_value(args.NewValue()); if (shouldMonitorAutoSuggestEvents) { auto revokersInspectable = winrt::make(); diff --git a/dev/Breadcrumb/BreadcrumbBarItem.cpp b/dev/Breadcrumb/BreadcrumbBarItem.cpp index bd66c1e0d1..9bea1fc770 100644 --- a/dev/Breadcrumb/BreadcrumbBarItem.cpp +++ b/dev/Breadcrumb/BreadcrumbBarItem.cpp @@ -732,7 +732,7 @@ bool BreadcrumbBarItem::IgnorePointerId(const winrt::PointerRoutedEventArgs& arg { MUX_ASSERT(m_isEllipsisDropDownItem); - uint32_t pointerId = args.Pointer().PointerId(); + const uint32_t pointerId = args.Pointer().PointerId(); if (m_trackedPointerId == 0) { diff --git a/dev/Breadcrumb/BreadcrumbLayout.cpp b/dev/Breadcrumb/BreadcrumbLayout.cpp index da55d17523..29ec64a528 100644 --- a/dev/Breadcrumb/BreadcrumbLayout.cpp +++ b/dev/Breadcrumb/BreadcrumbLayout.cpp @@ -106,7 +106,7 @@ int BreadcrumbLayout::GetFirstBreadcrumbBarItemToArrange(winrt::NonVirtualizingL for (int i = itemCount - 2; i >= 0; --i) { - float newAccumLength = accumLength + GetElementAt(context, i).DesiredSize().Width; + const float newAccumLength = accumLength + GetElementAt(context, i).DesiredSize().Width; if (newAccumLength > m_availableSize.Width) { return i + 1; diff --git a/dev/ColorPicker/ColorPicker.cpp b/dev/ColorPicker/ColorPicker.cpp index cb5d3ddb9e..e4521f2055 100644 --- a/dev/ColorPicker/ColorPicker.cpp +++ b/dev/ColorPicker/ColorPicker.cpp @@ -323,8 +323,8 @@ void ColorPicker::OnColorChanged(winrt::DependencyPropertyChangedEventArgs const UpdateColorControls(ColorUpdateReason::ColorPropertyChanged); } - winrt::Color oldColor = unbox_value(args.OldValue()); - winrt::Color newColor = unbox_value(args.NewValue()); + const winrt::Color oldColor = unbox_value(args.OldValue()); + const winrt::Color newColor = unbox_value(args.NewValue()); if (oldColor.A != newColor.A || oldColor.R != newColor.R || diff --git a/dev/ColorPicker/ColorPickerSlider.cpp b/dev/ColorPicker/ColorPickerSlider.cpp index 7970941926..cf00d86235 100644 --- a/dev/ColorPicker/ColorPickerSlider.cpp +++ b/dev/ColorPicker/ColorPickerSlider.cpp @@ -59,7 +59,7 @@ void ColorPickerSlider::OnKeyDown(winrt::KeyRoutedEventArgs const& args) return; } - bool isControlDown = (winrt::Window::Current().CoreWindow().GetKeyState(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down; + const bool isControlDown = (winrt::Window::Current().CoreWindow().GetKeyState(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down; double minBound = 0; double maxBound = 0; diff --git a/dev/ColorPicker/ColorSpectrum.cpp b/dev/ColorPicker/ColorSpectrum.cpp index 7211ccd6a8..d10e5da9dd 100644 --- a/dev/ColorPicker/ColorSpectrum.cpp +++ b/dev/ColorPicker/ColorSpectrum.cpp @@ -106,7 +106,7 @@ void ColorSpectrum::OnKeyDown(winrt::KeyRoutedEventArgs const& args) return; } - bool isControlDown = (winrt::Window::Current().CoreWindow().GetKeyState(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down; + const bool isControlDown = (winrt::Window::Current().CoreWindow().GetKeyState(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down; winrt::ColorPickerHsvChannel incrementChannel = winrt::ColorPickerHsvChannel::Hue; diff --git a/dev/ColorPicker/ColorSpectrumAutomationPeer.cpp b/dev/ColorPicker/ColorSpectrumAutomationPeer.cpp index 4cf62bf2c3..f544a816bd 100644 --- a/dev/ColorPicker/ColorSpectrumAutomationPeer.cpp +++ b/dev/ColorPicker/ColorSpectrumAutomationPeer.cpp @@ -89,7 +89,7 @@ winrt::hstring ColorSpectrumAutomationPeer::Value() void ColorSpectrumAutomationPeer::SetValue(winrt::hstring const& value) { winrt::ColorSpectrum colorSpectrumOwner = Owner().as(); - winrt::Color color = unbox_value(winrt::XamlBindingHelper::ConvertValue({ winrt::hstring_name_of(), winrt::TypeKind::Metadata }, box_value(value))); + const winrt::Color color = unbox_value(winrt::XamlBindingHelper::ConvertValue({ winrt::hstring_name_of(), winrt::TypeKind::Metadata }, box_value(value))); colorSpectrumOwner.Color(color); diff --git a/dev/ComboBox/ComboBoxHelper.cpp b/dev/ComboBox/ComboBoxHelper.cpp index bd74bdcd72..b60f564463 100644 --- a/dev/ComboBox/ComboBoxHelper.cpp +++ b/dev/ComboBox/ComboBoxHelper.cpp @@ -53,7 +53,7 @@ void ComboBoxHelper::OnKeepInteriorCornersSquarePropertyChanged( { if (auto comboBox = sender.try_as()) { - bool shouldMonitorDropDownState = unbox_value(args.NewValue()); + const bool shouldMonitorDropDownState = unbox_value(args.NewValue()); if (shouldMonitorDropDownState) { auto revokersInspectable = winrt::make(); diff --git a/dev/CommandBarFlyout/CommandBarFlyoutCommandBar.cpp b/dev/CommandBarFlyout/CommandBarFlyoutCommandBar.cpp index 18044de0f7..124e2dd689 100644 --- a/dev/CommandBarFlyout/CommandBarFlyoutCommandBar.cpp +++ b/dev/CommandBarFlyout/CommandBarFlyoutCommandBar.cpp @@ -556,7 +556,7 @@ void CommandBarFlyoutCommandBar::UpdateVisualState( // If there isn't enough space to display the overflow below the command bar, // and if there is enough space above, then we'll display it above instead. - if (auto window = winrt::Window::Current() && !hadActualPlacement && m_secondaryItemsRoot) + if (const auto window = winrt::Window::Current() && !hadActualPlacement && m_secondaryItemsRoot) { double availableHeight = -1; const auto controlBounds = TransformToVisual(nullptr).TransformBounds({ 0, 0, static_cast(ActualWidth()), static_cast(ActualHeight()) }); @@ -595,7 +595,7 @@ void CommandBarFlyoutCommandBar::UpdateVisualState( winrt::VisualStateManager::GoToState(*this, shouldExpandUp ? L"ExpandedUp" : L"ExpandedDown", useTransitions && !isForSizeChange); // Union of AvailableCommandsStates and ExpansionStates - bool hasPrimaryCommands = (PrimaryCommands().Size() != 0); + const bool hasPrimaryCommands = (PrimaryCommands().Size() != 0); if (hasPrimaryCommands) { if (shouldExpandUp) diff --git a/dev/CommandBarFlyout/TextCommandBarFlyout.cpp b/dev/CommandBarFlyout/TextCommandBarFlyout.cpp index d28e66c11b..10149cf439 100644 --- a/dev/CommandBarFlyout/TextCommandBarFlyout.cpp +++ b/dev/CommandBarFlyout/TextCommandBarFlyout.cpp @@ -208,7 +208,7 @@ void TextCommandBarFlyout::UpdateButtons() winrt::MenuFlyout proofingMenuFlyout = proofingFlyout.try_as(); - bool shouldIncludeProofingMenu = + const bool shouldIncludeProofingMenu = static_cast(proofingFlyout) && (!proofingMenuFlyout || proofingMenuFlyout.Items().Size() > 0); @@ -323,7 +323,7 @@ void TextCommandBarFlyout::UpdateButtons() addRichEditButtonToCommandsIfPresent(TextControlButtons::Underline, PrimaryCommands(), [](winrt::ITextSelection textSelection) { - auto underline = textSelection.CharacterFormat().Underline(); + const auto underline = textSelection.CharacterFormat().Underline(); return (underline != winrt::UnderlineType::None) && (underline != winrt::UnderlineType::Undefined); }); @@ -554,7 +554,7 @@ TextControlButtons TextCommandBarFlyout::GetPasswordBoxButtonsToAdd(winrt::Passw bool TextCommandBarFlyout::IsButtonInPrimaryCommands(TextControlButtons button) { uint32_t buttonIndex = 0; - bool wasFound = PrimaryCommands().IndexOf(GetButton(button), buttonIndex); + const bool wasFound = PrimaryCommands().IndexOf(GetButton(button), buttonIndex); return wasFound; } diff --git a/dev/InfoBar/InfoBarPanel.cpp b/dev/InfoBar/InfoBarPanel.cpp index 9cb2a37cb7..e5ef312f7b 100644 --- a/dev/InfoBar/InfoBarPanel.cpp +++ b/dev/InfoBar/InfoBarPanel.cpp @@ -132,7 +132,7 @@ winrt::Size InfoBarPanel::ArrangeOverride(winrt::Size const& finalSize) auto const desiredSize = child.DesiredSize(); if (desiredSize.Width != 0 && desiredSize.Height != 0) { - auto horizontalMargin = winrt::InfoBarPanel::GetHorizontalOrientationMargin(child); + const auto horizontalMargin = winrt::InfoBarPanel::GetHorizontalOrientationMargin(child); horizontalOffset += hasPreviousElement ? (float)horizontalMargin.Left : 0; if (i < childCount - 1) diff --git a/dev/Lights/MaterialHelper.cpp b/dev/Lights/MaterialHelper.cpp index fd8f9ad71f..e8ab23ff0e 100644 --- a/dev/Lights/MaterialHelper.cpp +++ b/dev/Lights/MaterialHelper.cpp @@ -970,7 +970,7 @@ winrt::CompositionSurfaceBrush MaterialHelper::GetNoiseBrushImpl() try { - winrt::ResolutionScale resScale{ winrt::DisplayInformation::GetForCurrentView().ResolutionScale() }; + const winrt::ResolutionScale resScale{ winrt::DisplayInformation::GetForCurrentView().ResolutionScale() }; if (resScale != winrt::ResolutionScale::Invalid) { resScaleInt = static_cast(resScale); diff --git a/dev/Materials/Backdrop/SystemBackdropWindowHandler.cpp b/dev/Materials/Backdrop/SystemBackdropWindowHandler.cpp index d67efd19f4..9e3920bc9d 100644 --- a/dev/Materials/Backdrop/SystemBackdropWindowHandler.cpp +++ b/dev/Materials/Backdrop/SystemBackdropWindowHandler.cpp @@ -209,7 +209,7 @@ namespace SystemBackdropComponentInternal else if (retryOnNextTick && !m_nextTickRevoker) { // We don't have a root yet so let's start with the system theme as the best we can do until the content appears. - auto systemTheme = winrt::Application::Current().RequestedTheme(); + const auto systemTheme = winrt::Application::Current().RequestedTheme(); m_actualTheme = (systemTheme == winrt::ApplicationTheme::Dark) ? winrt::ElementTheme::Dark : winrt::ElementTheme::Light; m_controller->UpdateTheme(m_actualTheme); diff --git a/dev/Materials/Reveal/RevealBrush.cpp b/dev/Materials/Reveal/RevealBrush.cpp index b4ddfc1ec8..2259bdd721 100644 --- a/dev/Materials/Reveal/RevealBrush.cpp +++ b/dev/Materials/Reveal/RevealBrush.cpp @@ -506,7 +506,7 @@ winrt::Windows::Graphics::Effects::IGraphicsEffect RevealBrush::CreateRevealHove // // // - winrt::Color initBaseColor{ 0, 0, 0, 0 }; + const winrt::Color initBaseColor{ 0, 0, 0, 0 }; // (9) Noise image BorderEffect (infinitely tiles noise image) auto noiseBorderEffect = winrt::make_self(); @@ -881,8 +881,8 @@ bool RevealBrush::ValidatePublicRootAncestor() // Either Window.Content is a Canvas, in which case it's the immediate child of the root visual and we should set lights // on it directly, or it isn't, in which case we should have walked up to the RootScrollViewer and set lights there. auto ancestor = GetAncestor(windowRoot); - bool windowContentIsCanvas = static_cast(windowRoot.try_as()); - bool walkedUpToScrollViewer = winrt::VisualTreeHelper::GetParent(windowRoot) && + const bool windowContentIsCanvas = static_cast(windowRoot.try_as()); + const bool walkedUpToScrollViewer = winrt::VisualTreeHelper::GetParent(windowRoot) && static_cast(ancestor.try_as()); // On MUX + RS3/RS4, it's possible XCB::OnConnected is called before visual tree is constructed and the ancestor walk returns a false elemenet. @@ -1054,7 +1054,7 @@ void RevealBrush::OnIsContainerPropertyChanged( { if (auto elementSender = sender.try_as()) { - bool isAdding = unbox_value(args.NewValue()); + const bool isAdding = unbox_value(args.NewValue()); auto lights = elementSender.Lights(); int i = 0; diff --git a/dev/NavigationView/NavigationView.cpp b/dev/NavigationView/NavigationView.cpp index 9b46157105..55912b304f 100644 --- a/dev/NavigationView/NavigationView.cpp +++ b/dev/NavigationView/NavigationView.cpp @@ -993,7 +993,7 @@ void NavigationView::RaiseItemInvokedForNavigationViewItem(const winrt::Navigati if (auto itemsSourceView = parentIR.ItemsSourceView()) { auto inspectingDataSource = static_cast(winrt::get_self(itemsSourceView)); - auto itemIndex = parentIR.GetElementIndex(nvi); + const auto itemIndex = parentIR.GetElementIndex(nvi); // Check that index is NOT -1, meaning it is actually realized if (itemIndex != -1) @@ -1005,7 +1005,7 @@ void NavigationView::RaiseItemInvokedForNavigationViewItem(const winrt::Navigati // Determine the recommeded transition direction. // Any transitions other than `Default` only apply in top nav scenarios. - auto recommendedDirection = [this, prevItem, nvi, parentIR]() + const auto recommendedDirection = [this, prevItem, nvi, parentIR]() { if (IsTopNavigationView() && nvi.SelectsOnInvoked()) { @@ -1209,7 +1209,7 @@ void NavigationView::OnRepeaterElementPrepared(const winrt::ItemsRepeater& ir, c nvibImpl->IsTopLevelItem(IsTopLevelItem(nvib)); // Visual state info propagation - auto position = [this, ir]() + const auto position = [this, ir]() { if (IsTopNavigationView()) { @@ -2350,7 +2350,7 @@ void NavigationView::ChangeSelection(const winrt::IInspectable& prevItem, const // otherwise if prevItem is on left side of nextActualItem, transition is from left // if prevItem is on right side of nextActualItem, transition is from right // click on Settings item is considered Default - auto recommendedDirection = [this, prevItem, nextItem]() + const auto recommendedDirection = [this, prevItem, nextItem]() { if (IsTopNavigationView()) { @@ -2943,7 +2943,7 @@ void NavigationView::OnKeyDown(winrt::KeyRoutedEventArgs const& e) m_TabKeyPrecedesFocusChange = true; break; case winrt::VirtualKey::Left: - auto altState = winrt::CoreWindow::GetForCurrentThread().GetKeyState(winrt::VirtualKey::Menu); + const auto altState = winrt::CoreWindow::GetForCurrentThread().GetKeyState(winrt::VirtualKey::Menu); const bool isAltPressed = (altState & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down; if (isAltPressed && IsPaneOpen() && IsLightDismissible()) @@ -4936,7 +4936,7 @@ void NavigationView::UpdatePaneShadow() // Shadow will get clipped if casting on the splitView.Content directly // Creating a canvas with negative margins as receiver to allow shadow to be drawn outside the content grid - winrt::Thickness shadowReceiverMargin = { 0, -c_paneElevationTranslationZ, -c_paneElevationTranslationZ, -c_paneElevationTranslationZ }; + const winrt::Thickness shadowReceiverMargin = { 0, -c_paneElevationTranslationZ, -c_paneElevationTranslationZ, -c_paneElevationTranslationZ }; // Ensuring shadow is aligned to the left shadowReceiver.HorizontalAlignment(winrt::HorizontalAlignment::Left); diff --git a/dev/NavigationView/NavigationViewItem.cpp b/dev/NavigationView/NavigationViewItem.cpp index 039690616b..847887ae1d 100644 --- a/dev/NavigationView/NavigationViewItem.cpp +++ b/dev/NavigationView/NavigationViewItem.cpp @@ -847,7 +847,7 @@ void NavigationViewItem::PropagateDepthToChildren(int depth) { if (auto const repeater = m_repeater.get()) { - auto itemsCount = repeater.ItemsSourceView().Count(); + const auto itemsCount = repeater.ItemsSourceView().Count(); for (int index = 0; index < itemsCount; index++) { if (auto const element = repeater.TryGetElement(index)) @@ -933,7 +933,7 @@ void NavigationViewItem::ResetTrackedPointerId() // Returns True when the provided pointer Id does not match the currently tracked Id. bool NavigationViewItem::IgnorePointerId(const winrt::PointerRoutedEventArgs& args) { - uint32_t pointerId = args.Pointer().PointerId(); + const uint32_t pointerId = args.Pointer().PointerId(); if (m_trackedPointerId == 0) { diff --git a/dev/NavigationView/NavigationViewItemsFactory.cpp b/dev/NavigationView/NavigationViewItemsFactory.cpp index 705581fb80..05c68e9ce7 100644 --- a/dev/NavigationView/NavigationViewItemsFactory.cpp +++ b/dev/NavigationView/NavigationViewItemsFactory.cpp @@ -129,7 +129,7 @@ void NavigationViewItemsFactory::RecycleElementCore(winrt::ElementFactoryRecycle } // Do not recycle SettingsItem - bool isSettingsItem = m_settingsItem && m_settingsItem == args.Element(); + const bool isSettingsItem = m_settingsItem && m_settingsItem == args.Element(); UnlinkElementFromParent(args); if (m_itemTemplateWrapper && !isSettingsItem) diff --git a/dev/ParallaxView/ScrollInputHelper.cpp b/dev/ParallaxView/ScrollInputHelper.cpp index 7142fd9a2a..299cde5355 100644 --- a/dev/ParallaxView/ScrollInputHelper.cpp +++ b/dev/ParallaxView/ScrollInputHelper.cpp @@ -366,7 +366,7 @@ void ScrollInputHelper::UpdateContentSize() return; } - int childrenCount = winrt::VisualTreeHelper::GetChildrenCount(itemsPresenter); + const int childrenCount = winrt::VisualTreeHelper::GetChildrenCount(itemsPresenter); if (childrenCount > 0) { @@ -474,7 +474,7 @@ void ScrollInputHelper::UpdateViewportSize() if (itemsPresenter) { - int childrenCount = winrt::VisualTreeHelper::GetChildrenCount(itemsPresenter); + const int childrenCount = winrt::VisualTreeHelper::GetChildrenCount(itemsPresenter); if (childrenCount > 0) { @@ -580,8 +580,8 @@ void ScrollInputHelper::UpdateIsTargetElementInSource() if (targetElement) { - bool sourceIsScrollViewer = m_scrollViewer != nullptr; - bool sourceIsScrollPresenter = m_scrollPresenter != nullptr; + const bool sourceIsScrollViewer = m_scrollViewer != nullptr; + const bool sourceIsScrollPresenter = m_scrollPresenter != nullptr; if (sourceIsScrollViewer || sourceIsScrollPresenter) { @@ -820,7 +820,7 @@ bool ScrollInputHelper::IsScrollContentPresenterIScrollInfoProvider() const if (itemsPresenter) { - int childrenCount = winrt::VisualTreeHelper::GetChildrenCount(itemsPresenter); + const int childrenCount = winrt::VisualTreeHelper::GetChildrenCount(itemsPresenter); if (childrenCount > 0) { diff --git a/dev/PersonPicture/InitialsGenerator.cpp b/dev/PersonPicture/InitialsGenerator.cpp index f9d4d99de2..634d4bc86d 100644 --- a/dev/PersonPicture/InitialsGenerator.cpp +++ b/dev/PersonPicture/InitialsGenerator.cpp @@ -37,7 +37,7 @@ winrt::hstring InitialsGenerator::InitialsFromContactObject(const winrt::Contact // available, that is the data which should be used. if (!contact.FirstName().empty() && !contact.LastName().empty()) { - CharacterType type = GetCharacterType(contact.FirstName()); + const CharacterType type = GetCharacterType(contact.FirstName()); // We'll attempt to make initials only if we recognize a name in the Standard character set. if (type == CharacterType::Standard) diff --git a/dev/RatingControl/RatingControl.cpp b/dev/RatingControl/RatingControl.cpp index dd664f4e72..4203d13de9 100644 --- a/dev/RatingControl/RatingControl.cpp +++ b/dev/RatingControl/RatingControl.cpp @@ -70,7 +70,7 @@ void RatingControl::UpdateCaptionMargins() // When text scale changes we need to update top margin to make the text follow start center. if (auto captionTextBlock = m_captionTextBlock.safe_get()) { - double textScaleFactor = GetUISettings().TextScaleFactor(); + const double textScaleFactor = GetUISettings().TextScaleFactor(); winrt::Thickness margin = captionTextBlock.Margin(); margin.Top = c_defaultCaptionTopMargin - (ActualRatingFontSize() * c_verticalScaleAnimationCenterPoint); @@ -767,7 +767,7 @@ void RatingControl::OnPointerMovedOverBackgroundStackPanel(const winrt::IInspect if (ShouldEnableAnimation()) { m_sharedPointerPropertySet.InsertScalar(L"starsScaleFocalPoint", xPosition); - auto deviceType = args.Pointer().PointerDeviceType(); + const auto deviceType = args.Pointer().PointerDeviceType(); switch (deviceType) { @@ -914,7 +914,7 @@ void RatingControl::OnKeyDown(winrt::KeyRoutedEventArgs const& eventArgs) flowDirectionReverser *= -1.0; } - auto originalKey = eventArgs.as().OriginalKey(); + const auto originalKey = eventArgs.as().OriginalKey(); // Up down are right/left in keyboard only if (originalKey == winrt::VirtualKey::Up) @@ -989,7 +989,7 @@ void RatingControl::OnPreviewKeyDown(winrt::KeyRoutedEventArgs const& eventArgs) if (!IsReadOnly() && IsFocusEngaged() && IsFocusEngagementEnabled()) { - auto originalKey = eventArgs.as().OriginalKey(); + const auto originalKey = eventArgs.as().OriginalKey(); if (originalKey == winrt::VirtualKey::GamepadA) { m_shouldDiscardValue = false; @@ -1024,7 +1024,7 @@ void RatingControl::OnPreviewKeyDown(winrt::KeyRoutedEventArgs const& eventArgs) void RatingControl::OnPreviewKeyUp(winrt::KeyRoutedEventArgs const& eventArgs) { - auto originalKey = eventArgs.as().OriginalKey(); + const auto originalKey = eventArgs.as().OriginalKey(); if (IsFocusEngagementEnabled() && originalKey == winrt::VirtualKey::GamepadA && m_disengagedWithA) { diff --git a/dev/RatingControl/RatingControlAutomationPeer.cpp b/dev/RatingControl/RatingControlAutomationPeer.cpp index 29d7a49d04..e791e97023 100644 --- a/dev/RatingControl/RatingControlAutomationPeer.cpp +++ b/dev/RatingControl/RatingControlAutomationPeer.cpp @@ -27,14 +27,14 @@ bool RatingControlAutomationPeer::IsReadOnly() hstring RatingControlAutomationPeer::IValueProvider_Value() { - double ratingValue = GetRatingControl().Value(); + const double ratingValue = GetRatingControl().Value(); winrt::hstring valueString; winrt::hstring ratingString; if (ratingValue == -1) { - double placeholderValue = GetRatingControl().PlaceholderValue(); + const double placeholderValue = GetRatingControl().PlaceholderValue(); if (placeholderValue == -1) { valueString = ResourceAccessor::GetLocalizedStringResource(SR_RatingUnset); @@ -86,7 +86,7 @@ double RatingControlAutomationPeer::Minimum() double RatingControlAutomationPeer::Value() { // Change this to provide a placeholder value too. - double value = GetRatingControl().Value(); + const double value = GetRatingControl().Value(); if (value == -1) { return 0; @@ -123,12 +123,12 @@ winrt::AutomationControlType RatingControlAutomationPeer::GetAutomationControlTy void RatingControlAutomationPeer::RaisePropertyChangedEvent(double newValue) { // UIA doesn't tolerate a null doubles, so we convert them to zeroes. - double oldValue = GetRatingControl().Value(); + const double oldValue = GetRatingControl().Value(); auto oldValueProp = winrt::PropertyValue::CreateDouble(oldValue); if (newValue == -1) { - auto newValueProp = winrt::PropertyValue::CreateDouble(0.0); + const auto newValueProp = winrt::PropertyValue::CreateDouble(0.0); __super::RaisePropertyChangedEvent(winrt::ValuePatternIdentifiers::ValueProperty(), oldValueProp, newValueProp); __super::RaisePropertyChangedEvent(winrt::RangeValuePatternIdentifiers::ValueProperty(), oldValueProp, newValueProp); } diff --git a/dev/Repeater/ElementManager.cpp b/dev/Repeater/ElementManager.cpp index 8d5c4045c0..4f532bfee1 100644 --- a/dev/Repeater/ElementManager.cpp +++ b/dev/Repeater/ElementManager.cpp @@ -314,7 +314,7 @@ void ElementManager::DataSourceChanged(const winrt::IInspectable& /*source*/, wi break; case winrt::NotifyCollectionChangedAction::Move: - int size = args.OldItems() != NULL ? args.OldItems().Size() : 1; + const int size = args.OldItems() != NULL ? args.OldItems().Size() : 1; OnItemsRemoved(args.OldStartingIndex(), size); OnItemsAdded(args.NewStartingIndex(), size); break; diff --git a/dev/Repeater/ItemsRepeater.cpp b/dev/Repeater/ItemsRepeater.cpp index a3f6426d1a..e1f1ab0ec4 100644 --- a/dev/Repeater/ItemsRepeater.cpp +++ b/dev/Repeater/ItemsRepeater.cpp @@ -721,7 +721,7 @@ void ItemsRepeater::OnLayoutChanged(const winrt::Layout& oldValue, const winrt:: m_arrangeInvalidated = newValue.ArrangeInvalidated(winrt::auto_revoke, { this, &ItemsRepeater::InvalidateArrangeForLayout }); } - bool isVirtualizingLayout = newValue != nullptr && newValue.try_as() != nullptr; + const bool isVirtualizingLayout = newValue != nullptr && newValue.try_as() != nullptr; m_viewportManager->OnLayoutChanged(isVirtualizingLayout); InvalidateMeasure(); } diff --git a/dev/Repeater/Phaser.cpp b/dev/Repeater/Phaser.cpp index 8a499e72d3..1ecdb3bbf9 100644 --- a/dev/Repeater/Phaser.cpp +++ b/dev/Repeater/Phaser.cpp @@ -145,10 +145,10 @@ void Phaser::DoPhasedWorkCallback() { // If the next element is oustide the visible window and there are elements in the visible window // go back to the visible window. - bool nextItemIsVisible = SharedHelpers::DoRectsIntersect(visibleWindow, m_pendingElements[currentIndex].VirtInfo()->ArrangeBounds()); + const bool nextItemIsVisible = SharedHelpers::DoRectsIntersect(visibleWindow, m_pendingElements[currentIndex].VirtInfo()->ArrangeBounds()); if (!nextItemIsVisible) { - bool haveVisibleItems = SharedHelpers::DoRectsIntersect(visibleWindow, m_pendingElements[pendingCount - 1].VirtInfo()->ArrangeBounds()); + const bool haveVisibleItems = SharedHelpers::DoRectsIntersect(visibleWindow, m_pendingElements[pendingCount - 1].VirtInfo()->ArrangeBounds()); if (haveVisibleItems) { currentIndex = pendingCount - 1; diff --git a/dev/Repeater/RecyclePool.cpp b/dev/Repeater/RecyclePool.cpp index f2f65674f5..052bd13b28 100644 --- a/dev/Repeater/RecyclePool.cpp +++ b/dev/Repeater/RecyclePool.cpp @@ -104,7 +104,7 @@ winrt::UIElement RecyclePool::TryGetElementCore( if (panel) { unsigned int childIndex = 0; - bool found = panel.Children().IndexOf(elementInfo.Element(), childIndex); + const bool found = panel.Children().IndexOf(elementInfo.Element(), childIndex); if (!found) { throw winrt::hresult_error(E_FAIL, L"ItemsRepeater's child not found in its Children collection."); diff --git a/dev/Repeater/SelectionModel.cpp b/dev/Repeater/SelectionModel.cpp index 5c4c202a7f..39d2cea195 100644 --- a/dev/Repeater/SelectionModel.cpp +++ b/dev/Repeater/SelectionModel.cpp @@ -190,7 +190,7 @@ winrt::IVectorView SelectionModel::SelectedItems() const unsigned int currentCount = node->SelectedCount(); if (index >= currentIndex && index < currentIndex + currentCount) { - int targetIndex = node->SelectedIndices().at(index - currentIndex); + const int targetIndex = node->SelectedIndices().at(index - currentIndex); item = node->ItemsSourceView().GetAt(targetIndex); break; } @@ -245,7 +245,7 @@ winrt::IVectorView SelectionModel::SelectedIndices() const unsigned int currentCount = node->SelectedCount(); if (index >= currentIndex && index < currentIndex + currentCount) { - int targetIndex = node->SelectedIndices().at(index - currentIndex); + const int targetIndex = node->SelectedIndices().at(index - currentIndex); path = winrt::get_self(info.Path)->CloneWithChildIndex(targetIndex); break; } diff --git a/dev/ScrollPresenter/ScrollPresenter.cpp b/dev/ScrollPresenter/ScrollPresenter.cpp index dcac3065bf..37e6d92a53 100644 --- a/dev/ScrollPresenter/ScrollPresenter.cpp +++ b/dev/ScrollPresenter/ScrollPresenter.cpp @@ -4339,7 +4339,7 @@ void ScrollPresenter::OnPointerWheelChangedHandler( return; } - winrt::CoreVirtualKeyStates ctrlState = winrt::CoreWindow::GetForCurrentThread().GetKeyState(winrt::VirtualKey::Control); + const winrt::CoreVirtualKeyStates ctrlState = winrt::CoreWindow::GetForCurrentThread().GetKeyState(winrt::VirtualKey::Control); winrt::PointerPoint pointerPoint = args.GetCurrentPoint(*this); winrt::PointerPointProperties pointerPointProperties = pointerPoint.Properties(); const bool isHorizontalMouseWheel = pointerPointProperties.IsHorizontalMouseWheel(); diff --git a/dev/ScrollPresenter/ScrollPresenterAnchoring.cpp b/dev/ScrollPresenter/ScrollPresenterAnchoring.cpp index 2d91e40568..87e14b96e2 100644 --- a/dev/ScrollPresenter/ScrollPresenterAnchoring.cpp +++ b/dev/ScrollPresenter/ScrollPresenterAnchoring.cpp @@ -189,7 +189,7 @@ void ScrollPresenter::ComputeElementAnchorPoint( if (m_anchorElement.get()) { - winrt::Rect anchorElementBounds = isForPreArrange ? m_anchorElementBounds : GetDescendantBounds(Content(), m_anchorElement.get()); + const winrt::Rect anchorElementBounds = isForPreArrange ? m_anchorElementBounds : GetDescendantBounds(Content(), m_anchorElement.get()); ComputeAnchorPoint(anchorElementBounds, elementAnchorPointHorizontalOffset, elementAnchorPointVerticalOffset); diff --git a/dev/ScrollView/ScrollBarController.cpp b/dev/ScrollView/ScrollBarController.cpp index f16a808016..b5164284be 100644 --- a/dev/ScrollView/ScrollBarController.cpp +++ b/dev/ScrollView/ScrollBarController.cpp @@ -550,7 +550,7 @@ bool ScrollBarController::RaiseScrollToRequested( m_scrollToRequested(*this, *scrollToRequestedEventArgs); - int32_t offsetChangeCorrelationId = scrollToRequestedEventArgs.as().CorrelationId(); + const int32_t offsetChangeCorrelationId = scrollToRequestedEventArgs.as().CorrelationId(); // Only increment m_operationsCount when the returned OffsetsChangeCorrelationId represents a new request that was not coalesced with a pending request. if (offsetChangeCorrelationId != -1 && offsetChangeCorrelationId != m_lastOffsetChangeCorrelationIdForScrollTo) @@ -583,7 +583,7 @@ bool ScrollBarController::RaiseScrollByRequested( m_scrollByRequested(*this, *scrollByRequestedEventArgs); - int32_t offsetChangeCorrelationId = scrollByRequestedEventArgs.as().CorrelationId(); + const int32_t offsetChangeCorrelationId = scrollByRequestedEventArgs.as().CorrelationId(); // Only increment m_operationsCount when the returned OffsetsChangeCorrelationId represents a new request that was not coalesced with a pending request. if (offsetChangeCorrelationId != -1 && offsetChangeCorrelationId != m_lastOffsetChangeCorrelationIdForScrollBy) @@ -623,7 +623,7 @@ bool ScrollBarController::RaiseAddScrollVelocityRequested( m_addScrollVelocityRequested(*this, *addScrollVelocityRequestedEventArgs); - int32_t offsetChangeCorrelationId = addScrollVelocityRequestedEventArgs.as().CorrelationId(); +const int32_t offsetChangeCorrelationId = addScrollVelocityRequestedEventArgs.as().CorrelationId(); // Only increment m_operationsCount when the returned OffsetsChangeCorrelationId represents a new request that was not coalesced with a pending request. if (offsetChangeCorrelationId != -1 && offsetChangeCorrelationId != m_lastOffsetChangeCorrelationIdForAddScrollVelocity) diff --git a/dev/ScrollView/ScrollView.cpp b/dev/ScrollView/ScrollView.cpp index eb6fc435d9..e67d2e45fc 100644 --- a/dev/ScrollView/ScrollView.cpp +++ b/dev/ScrollView/ScrollView.cpp @@ -810,8 +810,8 @@ void ScrollView::OnPropertyChanged(const winrt::DependencyPropertyChangedEventAr SCROLLVIEW_TRACE_VERBOSE(nullptr, L"%s(property: %s)\n", METH_NAME, DependencyPropertyToString(dependencyProperty).c_str()); #endif - bool horizontalChange = dependencyProperty == s_HorizontalScrollBarVisibilityProperty; - bool verticalChange = dependencyProperty == s_VerticalScrollBarVisibilityProperty; + const bool horizontalChange = dependencyProperty == s_HorizontalScrollBarVisibilityProperty; + const bool verticalChange = dependencyProperty == s_VerticalScrollBarVisibilityProperty; if (horizontalChange || verticalChange) { diff --git a/dev/SplitButton/SplitButton.cpp b/dev/SplitButton/SplitButton.cpp index a5475cdc4a..2d238283c1 100755 --- a/dev/SplitButton/SplitButton.cpp +++ b/dev/SplitButton/SplitButton.cpp @@ -355,7 +355,7 @@ void SplitButton::OnSplitButtonKeyUp(const winrt::IInspectable& sender, const wi } else if (key == winrt::VirtualKey::Down) { - winrt::CoreVirtualKeyStates menuState = winrt::CoreWindow::GetForCurrentThread().GetKeyState(winrt::VirtualKey::Menu); + const winrt::CoreVirtualKeyStates menuState = winrt::CoreWindow::GetForCurrentThread().GetKeyState(winrt::VirtualKey::Menu); const bool menuKeyDown = (menuState & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down; if (IsEnabled() && menuKeyDown) diff --git a/dev/SwipeControl/SwipeControl.cpp b/dev/SwipeControl/SwipeControl.cpp index 1337890248..15de8e596a 100644 --- a/dev/SwipeControl/SwipeControl.cpp +++ b/dev/SwipeControl/SwipeControl.cpp @@ -1646,10 +1646,10 @@ void SwipeControl::UpdateThresholdReached(float value) void SwipeControl::ThrowIfHasVerticalAndHorizontalContent(bool setIsHorizontal) { - bool hasLeftContent = LeftItems() && LeftItems().Size() > 0; - bool hasRightContent = RightItems() && RightItems().Size() > 0; - bool hasTopContent = TopItems() && TopItems().Size() > 0; - bool hasBottomContent = BottomItems() && BottomItems().Size() > 0; + const bool hasLeftContent = LeftItems() && LeftItems().Size() > 0; + const bool hasRightContent = RightItems() && RightItems().Size() > 0; + const bool hasTopContent = TopItems() && TopItems().Size() > 0; + const bool hasBottomContent = BottomItems() && BottomItems().Size() > 0; if (setIsHorizontal) { m_isHorizontal = hasLeftContent || hasRightContent || !(hasTopContent || hasBottomContent); diff --git a/dev/TabView/TabView.cpp b/dev/TabView/TabView.cpp index 71b6b6d1a4..938c4e5e84 100755 --- a/dev/TabView/TabView.cpp +++ b/dev/TabView/TabView.cpp @@ -152,7 +152,7 @@ void TabView::OnApplyTemplate() winrt::ThemeShadow shadow; shadow.Receivers().Append(GetShadowReceiver()); - double shadowDepth = unbox_value(SharedHelpers::FindInApplicationResources(c_tabViewShadowDepthName, box_value(c_tabShadowDepth))); + const double shadowDepth = unbox_value(SharedHelpers::FindInApplicationResources(c_tabViewShadowDepthName, box_value(c_tabShadowDepth))); const auto currentTranslation = shadowCaster.Translation(); const auto translation = winrt::float3{ currentTranslation.x, currentTranslation.y, (float)shadowDepth }; @@ -228,8 +228,8 @@ void TabView::OnListViewGettingFocus(const winrt::IInspectable& sender, const wi { if (auto&& listView = m_listView.get()) { - bool oldItemIsFromThisTabView = listView.IndexFromContainer(oldItem) != -1; - bool newItemIsFromThisTabView = listView.IndexFromContainer(newItem) != -1; + const bool oldItemIsFromThisTabView = listView.IndexFromContainer(oldItem) != -1; + const bool newItemIsFromThisTabView = listView.IndexFromContainer(newItem) != -1; if (oldItemIsFromThisTabView && newItemIsFromThisTabView) { const auto inputDevice = args.InputDevice(); @@ -365,7 +365,7 @@ void TabView::UpdateListViewItemContainerTransitions() // Because the default ItemContainerTransitions collection is defined in the TabViewListView style, all ListView instances share the same // collection by default. Thus to avoid one TabView affecting all other ones, a new ItemContainerTransitions collection is created // when the original one contains an AddDeleteThemeTransition or ContentThemeTransition instance. - bool transitionCollectionHasAddDeleteOrContentThemeTransition = [listView]() + const bool transitionCollectionHasAddDeleteOrContentThemeTransition = [listView]() { if (auto itemContainerTransitions = listView.ItemContainerTransitions()) { @@ -724,7 +724,7 @@ void TabView::OnItemsChanged(winrt::IInspectable const& item) { m_tabItemsChangedEventSource(*this, args); - int numItems = static_cast(TabItems().Size()); + const int numItems = static_cast(TabItems().Size()); const auto listViewInnerSelectedIndex = m_listView.get().SelectedIndex(); auto selectedIndex = SelectedIndex(); @@ -816,7 +816,7 @@ winrt::TabViewItem TabView::FindTabViewItemFromDragItem(const winrt::IInspectabl if (!tab) { // This is a fallback scenario for tabs without a data context - auto numItems = static_cast(TabItems().Size()); + const auto numItems = static_cast(TabItems().Size()); for (int i = 0; i < numItems; i++) { auto tabItem = ContainerFromIndex(i).try_as(); @@ -967,7 +967,7 @@ void TabView::RequestCloseTab(winrt::TabViewItem const& container, bool updateTa { if (!args.Cancel() && !args.Handled()) { - int focusedIndex = IndexFromContainer(container); + const int focusedIndex = IndexFromContainer(container); winrt::DependencyObject newFocusedElement{ nullptr }; for (int i = focusedIndex + 1; i < GetItemCount(); i++) @@ -1136,7 +1136,7 @@ void TabView::UpdateTabWidths(bool shouldUpdateWidths, bool fillAllAvailableSpac // Size tab column to needed size tabColumn.MaxWidth(availableWidth + headerWidth + footerWidth); - auto requiredWidth = tabWidth * TabItems().Size() + headerWidth + footerWidth; + const auto requiredWidth = tabWidth * TabItems().Size() + headerWidth + footerWidth; if (requiredWidth > availableWidth - (padding.Left + padding.Right)) { tabColumn.Width(winrt::GridLengthHelper::FromPixels(availableWidth)); diff --git a/dev/TabView/TabViewItem.cpp b/dev/TabView/TabViewItem.cpp index ca74a60539..3039b20e56 100644 --- a/dev/TabView/TabViewItem.cpp +++ b/dev/TabView/TabViewItem.cpp @@ -105,7 +105,7 @@ void TabViewItem::OnApplyTemplate() } m_shadow = shadow; - double shadowDepth = unbox_value(SharedHelpers::FindInApplicationResources(c_tabViewShadowDepthName, box_value(c_tabShadowDepth))); + const double shadowDepth = unbox_value(SharedHelpers::FindInApplicationResources(c_tabViewShadowDepthName, box_value(c_tabShadowDepth))); const auto currentTranslation = Translation(); const auto translation = winrt::float3{ currentTranslation.x, currentTranslation.y, (float)shadowDepth }; @@ -422,7 +422,7 @@ void TabViewItem::OnPointerPressed(winrt::PointerRoutedEventArgs const& args) auto pointerPoint = args.GetCurrentPoint(*this); if (pointerPoint.Properties().IsLeftButtonPressed()) { - auto isCtrlDown = (winrt::Window::Current().CoreWindow().GetKeyState(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down; + const auto isCtrlDown = (winrt::Window::Current().CoreWindow().GetKeyState(winrt::VirtualKey::Control) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down; if (isCtrlDown) { // Return here so the base class will not pick it up, but let it remain unhandled so someone else could handle it. @@ -545,8 +545,8 @@ void TabViewItem::OnKeyDown(winrt::KeyRoutedEventArgs const& args) // ListView also handles Alt+Arrow (no Shift) by just doing regular XY focus, // same as how it handles Arrow without any modifier keys, so in that case // we do want to handle things so we get the improved keyboarding experience. - auto isAltDown = (winrt::Window::Current().CoreWindow().GetKeyState(winrt::VirtualKey::Menu) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down; - auto isShiftDown = (winrt::Window::Current().CoreWindow().GetKeyState(winrt::VirtualKey::Shift) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down; + const auto isAltDown = (winrt::Window::Current().CoreWindow().GetKeyState(winrt::VirtualKey::Menu) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down; + const auto isShiftDown = (winrt::Window::Current().CoreWindow().GetKeyState(winrt::VirtualKey::Shift) & winrt::CoreVirtualKeyStates::Down) == winrt::CoreVirtualKeyStates::Down; if (!isAltDown || !isShiftDown) { diff --git a/dev/TabView/TabViewItemAutomationPeer.cpp b/dev/TabView/TabViewItemAutomationPeer.cpp index e4cb1ea6ff..1a5ab3880b 100644 --- a/dev/TabView/TabViewItemAutomationPeer.cpp +++ b/dev/TabView/TabViewItemAutomationPeer.cpp @@ -88,7 +88,7 @@ void TabViewItemAutomationPeer::RemoveFromSelection() void TabViewItemAutomationPeer::Select() { - if (auto owner = Owner().try_as().get()) + if (const auto* owner = Owner().try_as().get()) { owner->IsSelected(true); } diff --git a/dev/TeachingTip/TeachingTip.cpp b/dev/TeachingTip/TeachingTip.cpp index 068d985f5a..4b0d533a23 100644 --- a/dev/TeachingTip/TeachingTip.cpp +++ b/dev/TeachingTip/TeachingTip.cpp @@ -1181,7 +1181,7 @@ bool TeachingTip::HandleF6Clicked(bool fromPopup) if (hasFocusInSubtree && fromPopup) { - bool setFocus = SetFocus(m_previouslyFocusedElement.get(), winrt::FocusState::Programmatic); + const bool setFocus = SetFocus(m_previouslyFocusedElement.get(), winrt::FocusState::Programmatic); m_previouslyFocusedElement = nullptr; return setFocus; } @@ -1612,7 +1612,7 @@ void TeachingTip::CreateExpandAnimation() { auto const compositor = winrt::Window::Current().Compositor(); - auto&& expandEasingFunction = [this, compositor]() + const auto&& expandEasingFunction = [this, compositor]() { if (!m_expandEasingFunction) { @@ -1659,7 +1659,7 @@ void TeachingTip::CreateContractAnimation() { auto const compositor = winrt::Window::Current().Compositor(); - auto&& contractEasingFunction = [this, compositor]() + const auto&& contractEasingFunction = [this, compositor]() { if (!m_contractEasingFunction) { diff --git a/dev/TreeView/TreeViewItem.cpp b/dev/TreeView/TreeViewItem.cpp index 8c6b24a4aa..bcd3295f3a 100644 --- a/dev/TreeView/TreeViewItem.cpp +++ b/dev/TreeView/TreeViewItem.cpp @@ -314,7 +314,7 @@ void TreeViewItem::OnPropertyChanged(const winrt::DependencyPropertyChangedEvent { if (property == s_IsExpandedProperty) { - bool value = unbox_value(args.NewValue()); + const bool value = unbox_value(args.NewValue()); if (node.IsExpanded() != value) { UpdateNodeIsExpandedAsync(node, value); @@ -327,7 +327,7 @@ void TreeViewItem::OnPropertyChanged(const winrt::DependencyPropertyChangedEvent } else if (property == s_HasUnrealizedChildrenProperty) { - bool value = unbox_value(args.NewValue()); + const bool value = unbox_value(args.NewValue()); node.HasUnrealizedChildren(value); } } @@ -601,7 +601,7 @@ void TreeViewItem::HandleReorder(winrt::VirtualKey key) winrt::TreeViewNode parentNode = targetNode.Parent(); const auto listControl = AncestorTreeView()->ListControl(); - unsigned int position = listControl->IndexFromContainer(*this); + const unsigned int position = listControl->IndexFromContainer(*this); if (key == winrt::VirtualKey::Up || key == winrt::VirtualKey::Left && position != 0) { unsigned int childIndex; diff --git a/dev/TreeView/TreeViewItemAutomationPeer.cpp b/dev/TreeView/TreeViewItemAutomationPeer.cpp index 3e1b29af33..a8cc778007 100644 --- a/dev/TreeView/TreeViewItemAutomationPeer.cpp +++ b/dev/TreeView/TreeViewItemAutomationPeer.cpp @@ -138,7 +138,7 @@ int32_t TreeViewItemAutomationPeer::GetSizeOfSetCore() { if (const auto targetParentNode = targetNode.Parent()) { - UINT32 size = targetParentNode.Children().Size(); + const UINT32 size = targetParentNode.Children().Size(); setSize = static_cast(size); } } diff --git a/dev/TreeView/TreeViewList.cpp b/dev/TreeView/TreeViewList.cpp index 6cbcc43451..7e4752acec 100644 --- a/dev/TreeView/TreeViewList.cpp +++ b/dev/TreeView/TreeViewList.cpp @@ -50,7 +50,7 @@ void TreeViewList::OnDragItemsStarting(const winrt::IInspectable& /*sender*/, co bool isMultipleDragging = false; if (IsMutiSelectWithSelectedItems()) { - int selectedCount = ListViewModel()->GetSelectedNodes().Size(); + const int selectedCount = ListViewModel()->GetSelectedNodes().Size(); if (selectedCount > 1) { auto settings = tvItem.as().TreeViewItemTemplateSettings(); @@ -461,7 +461,7 @@ void TreeViewList::UpdateDropTargetDropEffect(bool forceUpdate, bool isLeaving, int insertIndex = -1; int afterInsertIndex = -1; int beforeInsertIndex = -1; - auto dragItemIndex = IndexFromContainer(dragItem); + const auto dragItemIndex = IndexFromContainer(dragItem); if (keyboardReorderedContainer) { @@ -557,7 +557,7 @@ std::vector TreeViewList::GetRootsOfSelectedSubtrees() cons int TreeViewList::FlatIndex(const winrt::TreeViewNode& node) const { unsigned int flatIndex = 0; - bool found = ListViewModel()->IndexOfNode(node, flatIndex); + const bool found = ListViewModel()->IndexOfNode(node, flatIndex); flatIndex = found ? flatIndex : -1; return flatIndex; } diff --git a/dev/TreeView/TreeViewNode.cpp b/dev/TreeView/TreeViewNode.cpp index dc71443470..fe9113e949 100644 --- a/dev/TreeView/TreeViewNode.cpp +++ b/dev/TreeView/TreeViewNode.cpp @@ -96,7 +96,7 @@ void TreeViewNode::UpdateDepth(int depth) void TreeViewNode::UpdateHasChildren() { - bool hasChildren = ((Children().Size() != 0) || m_HasUnrealizedChildren); + const bool hasChildren = ((Children().Size() != 0) || m_HasUnrealizedChildren); SetValue(s_HasChildrenProperty, box_value(hasChildren)); } diff --git a/dev/TreeView/ViewModel.cpp b/dev/TreeView/ViewModel.cpp index eca05a55ac..1dd87f61f2 100644 --- a/dev/TreeView/ViewModel.cpp +++ b/dev/TreeView/ViewModel.cpp @@ -603,7 +603,7 @@ int ViewModel::AddNodeDescendantsToView(const winrt::TreeViewNode& value, unsign { if (value.IsExpanded()) { - unsigned int size = value.Children().Size(); + const unsigned int size = value.Children().Size(); for (unsigned int i = 0; i < size; i++) { auto childNode = value.Children().GetAt(i).as(); @@ -623,7 +623,7 @@ void ViewModel::RemoveNodeAndDescendantsFromView(const winrt::TreeViewNode& valu UINT32 valueIndex; if (value.IsExpanded()) { - unsigned int size = value.Children().Size(); + const unsigned int size = value.Children().Size(); for (unsigned int i = 0; i < size; i++) { auto childNode = value.Children().GetAt(i).as(); @@ -689,7 +689,7 @@ winrt::TreeViewNode ViewModel::GetRemovedChildTreeViewNodeByIndex(winrt::TreeVie int ViewModel::CountDescendants(const winrt::TreeViewNode& value) { int descendantCount = 0; - unsigned int size = value.Children().Size(); + const unsigned int size = value.Children().Size(); for (unsigned int i = 0; i < size; i++) { auto childNode = value.Children().GetAt(i).as(); @@ -917,8 +917,8 @@ bool ViewModel::IndexOfNode(winrt::TreeViewNode const& targetNode, uint32_t& ind void ViewModel::TreeViewNodeVectorChanged(winrt::TreeViewNode const& sender, winrt::IInspectable const& args) { - winrt::CollectionChange collectionChange = args.as().CollectionChange(); - unsigned int index = args.as().Index(); + const winrt::CollectionChange collectionChange = args.as().CollectionChange(); + const unsigned int index = args.as().Index(); switch (collectionChange) { @@ -1035,8 +1035,8 @@ void ViewModel::TreeViewNodeVectorChanged(winrt::TreeViewNode const& sender, win void ViewModel::SelectedNodeChildrenChanged(winrt::TreeViewNode const& sender, winrt::IInspectable const& args) { - winrt::CollectionChange collectionChange = args.as().CollectionChange(); - unsigned int index = args.as().Index(); + const winrt::CollectionChange collectionChange = args.as().CollectionChange(); + const unsigned int index = args.as().Index(); auto changingChildrenNode = sender.as(); switch (collectionChange) diff --git a/dev/inc/DispatcherHelper.h b/dev/inc/DispatcherHelper.h index a4d038d5b2..a7cba97e66 100644 --- a/dev/inc/DispatcherHelper.h +++ b/dev/inc/DispatcherHelper.h @@ -32,7 +32,7 @@ class DispatcherHelper { if (dispatcherQueue) { - auto result = dispatcherQueue.TryEnqueue(winrt::Windows::System::DispatcherQueueHandler(func)); + const auto result = dispatcherQueue.TryEnqueue(winrt::Windows::System::DispatcherQueueHandler(func)); if (!result) { if (fallbackToThisThread) diff --git a/dev/inc/SharedHelpers.h b/dev/inc/SharedHelpers.h index 026a026a64..cdd3290810 100755 --- a/dev/inc/SharedHelpers.h +++ b/dev/inc/SharedHelpers.h @@ -162,7 +162,7 @@ class SharedHelpers static winrt::FrameworkElement FindInVisualTree(winrt::FrameworkElement const& parent, std::function const& isMatch) { - int numChildren = winrt::VisualTreeHelper::GetChildrenCount(parent); + const int numChildren = winrt::VisualTreeHelper::GetChildrenCount(parent); winrt::FrameworkElement foundElement = parent; if (isMatch(foundElement)) From 242230100750a1828aa7aba36ac36fec03d0329d Mon Sep 17 00:00:00 2001 From: Dmitriy Komin <45051803+DmitriyKomin@users.noreply.github.com> Date: Wed, 21 Jun 2023 12:36:49 -0700 Subject: [PATCH 4/6] Fix Voice Access 'Show Bubbles' annotation of WebView2 Content (#8551) * wv2 changes * Make IRawElementProviderFragmentRoot::GetFocus return S_OK instead of E_NOTIMPL * Add null check to _Outptr_opt_ arg of GetRawElementProviderSimple --------- Co-authored-by: Ranjesh Jaganathan <28935693+ranjeshj@users.noreply.github.com> --- dev/WebView2/WebView2AutomationPeer.cpp | 21 +++++++++++++++++---- dev/WebView2/WebView2AutomationPeer.h | 20 +++++++++++++------- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/dev/WebView2/WebView2AutomationPeer.cpp b/dev/WebView2/WebView2AutomationPeer.cpp index 41393e100e..cd61c0f85e 100644 --- a/dev/WebView2/WebView2AutomationPeer.cpp +++ b/dev/WebView2/WebView2AutomationPeer.cpp @@ -42,17 +42,27 @@ winrt::Rect WebView2AutomationPeer::GetBoundingRectangleCore() return boundingRect; } -#if WINUI3 HRESULT WebView2AutomationPeer::GetRawElementProviderSimple(_Outptr_opt_ IRawElementProviderSimple** value) { + if (value == nullptr) return S_OK; + + *value = nullptr; + InitProvider(); - m_provider.copy_to(value); + + auto wrapperSimple = m_providerWrapper.try_as(); + if (wrapperSimple) + { + wrapperSimple.copy_to(value); + } + return S_OK; } HRESULT WebView2AutomationPeer::IsCorrectPeerForHwnd(HWND hwnd, _Out_ bool* value) { *value = false; + if (!InitProvider()) { return S_OK; @@ -63,9 +73,9 @@ HRESULT WebView2AutomationPeer::IsCorrectPeerForHwnd(HWND hwnd, _Out_ bool* valu { *value = true; } + return S_OK; } -#endif struct ProviderWrapper : winrt::implements { @@ -212,7 +222,10 @@ struct ProviderWrapper : winrt::implements + public ReferenceTracker { public: WebView2AutomationPeer(winrt::WebView2 const& owner); @@ -27,10 +35,8 @@ class WebView2AutomationPeer : winrt::IInspectable GetElementFromPointCore(winrt::Point pointInWindowCoordinates); // IAutomationPeerHwndInterop -#if WINUI3 HRESULT STDMETHODCALLTYPE GetRawElementProviderSimple(_Outptr_opt_ IRawElementProviderSimple** value); HRESULT STDMETHODCALLTYPE IsCorrectPeerForHwnd(HWND hwnd, _Out_ bool* value); -#endif private: com_ptr GetImpl(); From e550335256658a1acbe23856290451828e9ab73c Mon Sep 17 00:00:00 2001 From: Keith Mahoney Date: Thu, 22 Jun 2023 19:56:20 +0000 Subject: [PATCH 5/6] Merged PR 9180486: Fix icons --- dev/AnimatedIcon/TestUI/AnimatedIconPage.xaml | 2 +- .../AutoSuggestBox_themeresources.xaml | 2 +- .../AutoSuggestBox_themeresources_v1.xaml | 2 +- .../TestUI/AutoSuggestBoxPage.xaml | 2 +- dev/ComboBox/ComboBox_themeresources.xaml | 2 +- dev/ComboBox/ComboBox_themeresources_v1.xaml | 2 +- .../CommandBarFlyoutOS_themeresources.xaml | 2 +- .../CommandBarFlyoutOS_themeresources_v1.xaml | 2 +- .../CommandBarFlyout_themeresources.xaml | 4 +- .../CommandBarFlyout_themeresources_v1.xaml | 4 +- .../AppBarButton_themeresources_v1.xaml | 2 +- .../CalendarView_themeresources_v1.xaml | 4 +- dev/CommonStyles/CheckBox_themeresources.xaml | 2 +- .../CheckBox_themeresources_v1.xaml | 2 +- .../CommandBar_themeresources.xaml | 2 +- .../CommandBar_themeresources_v1.xaml | 4 +- .../FlipView_themeresources_v1.xaml | 8 +-- .../InkToolbar_themeresources.xaml | 62 +++++++++---------- .../MenuFlyout_themeresources.xaml | 4 +- .../MenuFlyout_themeresources_v1.xaml | 8 +-- .../PasswordBox_themeresources.xaml | 2 +- .../PasswordBox_themeresources_v1.xaml | 2 +- dev/CommonStyles/Pivot_themeresources.xaml | 4 +- dev/CommonStyles/Pivot_themeresources_v1.xaml | 4 +- .../ScrollBar_themeresources_v1.xaml | 8 +-- dev/CommonStyles/TextBox_themeresources.xaml | 2 +- .../TextBox_themeresources_v1.xaml | 2 +- .../RevealBrush_19h1_themeresources.xaml | 2 +- .../RevealBrush_rs3_themeresources.xaml | 2 +- .../RevealBrush_rs4_themeresources.xaml | 2 +- .../NavigationView_rs1_themeresources.xaml | 6 +- .../NavigationView_rs1_themeresources_v1.xaml | 6 +- ...vigationViewCompactPaneLengthTestPage.xaml | 2 +- dev/NumberBox/NumberBox.xaml | 2 +- dev/NumberBox/NumberBox_v1.xaml | 2 +- .../RadioMenuFlyoutItem_themeresources.xaml | 2 +- .../TestUI/RatingControlPage.xaml | 2 +- .../TestUI/RatingControlPage.xaml.cs | 2 +- .../SwipeControl_TestUI/SwipeControlPage.xaml | 2 +- .../SwipeControlPage2.xaml | 2 +- .../Tests/MetadataProviderTests.cs | 2 +- ...sableAnimationsStylesOutsideStore_rs2.xaml | 2 +- tools/CustomTasks/Utils.cs | 2 +- 43 files changed, 93 insertions(+), 93 deletions(-) diff --git a/dev/AnimatedIcon/TestUI/AnimatedIconPage.xaml b/dev/AnimatedIcon/TestUI/AnimatedIconPage.xaml index b2e5df2197..983796afc7 100644 --- a/dev/AnimatedIcon/TestUI/AnimatedIconPage.xaml +++ b/dev/AnimatedIcon/TestUI/AnimatedIconPage.xaml @@ -582,7 +582,7 @@ - + diff --git a/dev/AutoSuggestBox/AutoSuggestBox_themeresources.xaml b/dev/AutoSuggestBox/AutoSuggestBox_themeresources.xaml index c21aabff8e..78870e3b14 100644 --- a/dev/AutoSuggestBox/AutoSuggestBox_themeresources.xaml +++ b/dev/AutoSuggestBox/AutoSuggestBox_themeresources.xaml @@ -120,7 +120,7 @@ HorizontalAlignment="Center" FontStyle="Normal" FontSize="{ThemeResource AutoSuggestBoxIconFontSize}" - Text="" + Text="" FontFamily="{ThemeResource SymbolThemeFontFamily}" AutomationProperties.AccessibilityView="Raw" /> diff --git a/dev/AutoSuggestBox/AutoSuggestBox_themeresources_v1.xaml b/dev/AutoSuggestBox/AutoSuggestBox_themeresources_v1.xaml index 19967e7867..1eacad4b3d 100644 --- a/dev/AutoSuggestBox/AutoSuggestBox_themeresources_v1.xaml +++ b/dev/AutoSuggestBox/AutoSuggestBox_themeresources_v1.xaml @@ -112,7 +112,7 @@ VerticalAlignment="Center" HorizontalAlignment="Center" FontStyle="Normal" - Text="" + Text="" FontSize="{ThemeResource AutoSuggestBoxIconFontSize}" FontFamily="{ThemeResource SymbolThemeFontFamily}" AutomationProperties.AccessibilityView="Raw" /> diff --git a/dev/AutoSuggestBox/TestUI/AutoSuggestBoxPage.xaml b/dev/AutoSuggestBox/TestUI/AutoSuggestBoxPage.xaml index 12931aa927..244350dc8c 100644 --- a/dev/AutoSuggestBox/TestUI/AutoSuggestBoxPage.xaml +++ b/dev/AutoSuggestBox/TestUI/AutoSuggestBoxPage.xaml @@ -21,7 +21,7 @@ - + diff --git a/dev/ComboBox/ComboBox_themeresources.xaml b/dev/ComboBox/ComboBox_themeresources.xaml index 8da4b70b86..2a9862f060 100755 --- a/dev/ComboBox/ComboBox_themeresources.xaml +++ b/dev/ComboBox/ComboBox_themeresources.xaml @@ -728,7 +728,7 @@ Foreground="{ThemeResource ComboBoxDropDownGlyphForeground}" FontFamily="{ThemeResource SymbolThemeFontFamily}" FontSize="12" - Glyph=""/> + Glyph=""/> diff --git a/dev/CommandBarFlyout/CommandBarFlyoutOS_themeresources.xaml b/dev/CommandBarFlyout/CommandBarFlyoutOS_themeresources.xaml index a00f8d60c0..b81b0e3a7c 100644 --- a/dev/CommandBarFlyout/CommandBarFlyoutOS_themeresources.xaml +++ b/dev/CommandBarFlyout/CommandBarFlyoutOS_themeresources.xaml @@ -451,7 +451,7 @@ VerticalAlignment="Center" FontFamily="{ThemeResource SymbolThemeFontFamily}" FontSize="16" - Glyph="" /> + Glyph="" /> diff --git a/dev/CommandBarFlyout/CommandBarFlyoutOS_themeresources_v1.xaml b/dev/CommandBarFlyout/CommandBarFlyoutOS_themeresources_v1.xaml index d1b84d4010..da4e097adc 100644 --- a/dev/CommandBarFlyout/CommandBarFlyoutOS_themeresources_v1.xaml +++ b/dev/CommandBarFlyout/CommandBarFlyoutOS_themeresources_v1.xaml @@ -449,7 +449,7 @@ VerticalAlignment="Center" FontFamily="{ThemeResource SymbolThemeFontFamily}" FontSize="16" - Glyph="" /> + Glyph="" /> diff --git a/dev/CommandBarFlyout/CommandBarFlyout_themeresources.xaml b/dev/CommandBarFlyout/CommandBarFlyout_themeresources.xaml index 11c8943386..b4182be514 100644 --- a/dev/CommandBarFlyout/CommandBarFlyout_themeresources.xaml +++ b/dev/CommandBarFlyout/CommandBarFlyout_themeresources.xaml @@ -547,7 +547,7 @@ + Glyph="" /> diff --git a/dev/CommandBarFlyout/CommandBarFlyout_themeresources_v1.xaml b/dev/CommandBarFlyout/CommandBarFlyout_themeresources_v1.xaml index 37cf4c0533..25203f99ee 100644 --- a/dev/CommandBarFlyout/CommandBarFlyout_themeresources_v1.xaml +++ b/dev/CommandBarFlyout/CommandBarFlyout_themeresources_v1.xaml @@ -453,7 +453,7 @@ + Glyph="" /> diff --git a/dev/CommonStyles/AppBarButton_themeresources_v1.xaml b/dev/CommonStyles/AppBarButton_themeresources_v1.xaml index adf1025b42..ba86e4acc5 100644 --- a/dev/CommonStyles/AppBarButton_themeresources_v1.xaml +++ b/dev/CommonStyles/AppBarButton_themeresources_v1.xaml @@ -417,7 +417,7 @@ AutomationProperties.AccessibilityView="Raw" /> diff --git a/dev/Materials/Reveal/RevealBrush_rs4_themeresources.xaml b/dev/Materials/Reveal/RevealBrush_rs4_themeresources.xaml index 468bdcabb1..65616e0ce2 100644 --- a/dev/Materials/Reveal/RevealBrush_rs4_themeresources.xaml +++ b/dev/Materials/Reveal/RevealBrush_rs4_themeresources.xaml @@ -1314,7 +1314,7 @@ VerticalAlignment="Center" FontFamily="{ThemeResource SymbolThemeFontFamily}" FontSize="20" - Glyph="" + Glyph="" Height="{ThemeResource AppBarExpandButtonCircleDiameter}" /> diff --git a/dev/NavigationView/NavigationView_rs1_themeresources.xaml b/dev/NavigationView/NavigationView_rs1_themeresources.xaml index 748cb8f593..3ad9591418 100755 --- a/dev/NavigationView/NavigationView_rs1_themeresources.xaml +++ b/dev/NavigationView/NavigationView_rs1_themeresources.xaml @@ -411,7 +411,7 @@ - + @@ -472,7 +472,7 @@ AutomationProperties.AccessibilityView="Raw" FontFamily="{ThemeResource SymbolThemeFontFamily}" FontSize="16" - Glyph="" + Glyph="" Foreground="{TemplateBinding Foreground}" IsHitTestVisible="False" /> @@ -534,7 +534,7 @@ AutomationProperties.AccessibilityView="Raw" FontFamily="{ThemeResource SymbolThemeFontFamily}" FontSize="20" - Glyph="" + Glyph="" Foreground="{TemplateBinding Foreground}" IsHitTestVisible="False" /> diff --git a/dev/NavigationView/NavigationView_rs1_themeresources_v1.xaml b/dev/NavigationView/NavigationView_rs1_themeresources_v1.xaml index efb6b197c5..b5076bad97 100644 --- a/dev/NavigationView/NavigationView_rs1_themeresources_v1.xaml +++ b/dev/NavigationView/NavigationView_rs1_themeresources_v1.xaml @@ -403,7 +403,7 @@