Skip to content

Commit

Permalink
chore: Adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Aug 20, 2024
1 parent 4e2c564 commit 4ab066c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.partial.mux.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ItemsPresenter>());
SetItemsPresenter((_popup.Child as ViewGroup).FindFirstChild<ItemsPresenter>()!);
#elif __IOS__ || __MACOS__
SetItemsPresenter(_popup.Child.FindFirstChild<ItemsPresenter>());
SetItemsPresenter(_popup.Child.FindFirstChild<ItemsPresenter>()!);
#endif
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 4ab066c

Please sign in to comment.