diff --git a/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.partial.h.mux.cs b/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.partial.h.mux.cs index 59dd5de3ffaa..63c11e64b579 100644 --- a/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.partial.h.mux.cs +++ b/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.partial.h.mux.cs @@ -1,10 +1,5 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using DirectUI; -using Microsoft.UI.Xaml.Documents; using Microsoft.UI.Xaml.Media.Animation; using Uno.Disposables; using Uno.UI.Xaml.Input; @@ -16,12 +11,13 @@ partial class ComboBox { private const char VK_ESCAPE = (char)0x1B; -// TODO MZ: These disablings should not be required + // TODO MZ: These disablings should not be required #pragma warning disable CS0067 // Unused only in reference API. #pragma warning disable CS0649 // Unused only in reference API. #pragma warning disable CS0169 // Unused only in reference API. #pragma warning disable CS0168 // Unused only in reference API. #pragma warning disable CS0414 // Unused only in reference API. +#pragma warning disable IDE0055 // Unused only in reference API. internal bool IsSearchResultIndexSet() => m_searchResultIndexSet; internal int GetSearchResultIndex() => m_searchResultIndex; diff --git a/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.partial.mux.cs b/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.partial.mux.cs index baaf3cbca8ff..a703240587f5 100644 --- a/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.partial.mux.cs +++ b/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.partial.mux.cs @@ -829,9 +829,9 @@ private void OnOpen() #if HAS_UNO // Force load children // This method will load the itempresenter children #if __ANDROID__ - SetItemsPresenter((_popup.Child as ViewGroup).FindFirstChild()); + SetItemsPresenter((_popup.Child as ViewGroup).FindFirstChild()!); #elif __IOS__ || __MACOS__ - SetItemsPresenter(_popup.Child.FindFirstChild()); + SetItemsPresenter(_popup.Child.FindFirstChild()!); #endif #endif diff --git a/src/Uno.UI/UI/Xaml/Controls/Primitives/SelectorItem.partial.mux.cs b/src/Uno.UI/UI/Xaml/Controls/Primitives/SelectorItem.partial.mux.cs index 5d801a52ea5c..0345f6a9e885 100644 --- a/src/Uno.UI/UI/Xaml/Controls/Primitives/SelectorItem.partial.mux.cs +++ b/src/Uno.UI/UI/Xaml/Controls/Primitives/SelectorItem.partial.mux.cs @@ -55,11 +55,11 @@ internal override string GetPlainText() var contentTemplateRoot = ContentTemplateRoot; - if (contentTemplateRoot != null) + if (contentTemplateRoot is DependencyObject doContentTemplateRoot) { // we have the first child of the content. Check whether it has an automation name - strPlainText = AutomationProperties.GetName(contentTemplateRoot); + strPlainText = AutomationProperties.GetName(doContentTemplateRoot); // fallback: use getplain text on it if (string.IsNullOrEmpty(strPlainText))