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/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/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/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/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/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/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/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/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.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/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 @@