Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WinUI3: AutoSuggestBox Search Icon Position Offset #7601

Closed
myokeeh opened this issue Aug 13, 2022 · 3 comments
Closed

WinUI3: AutoSuggestBox Search Icon Position Offset #7601

myokeeh opened this issue Aug 13, 2022 · 3 comments
Labels
area-AutoSuggestBox bug Something isn't working no-issue-activity product-winui3 WinUI 3 issues team-Controls Issue for the Controls team

Comments

@myokeeh
Copy link

myokeeh commented Aug 13, 2022

#5537

The same bug appears to be present in WinUI3. I'm in the process of migrating an app and dismayed that this bug which was fixed in 2.8 is in 3.

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Aug 13, 2022
@brentesh
Copy link

I'm seeing this as well. I can work around it by setting the placeholder content presenter's ColumnSpan to 3:

        static MethodInfo getTemplateChildMethod;
        static MethodInfo GetTemplateChildMethod
        {
            get
            {
                if (getTemplateChildMethod == null)
                    getTemplateChildMethod = typeof(AutoSuggestBox).GetMethods(BindingFlags.NonPublic | BindingFlags.Instance).SingleOrDefault(m => m.Name == "GetTemplateChild");

                return getTemplateChildMethod;
            }
        }

        static object GetTemplateChild(object control, string id, bool expectResult = true)
        {
            var child = GetTemplateChildMethod.Invoke(control, new object[] { id });
            if (child == null && expectResult)
                throw new InvalidOperationException($"Could not find {id} as a template child");

            return child;
        }

        void AssociatedObject_Loaded(object sender, RoutedEventArgs e)
        {
            AddProgressBarToChildTemplate();
            var textBox = GetTemplateChild(AssociatedObject, "TextBox");
            var placeholderText = (ContentControl)GetTemplateChild(textBox, "PlaceholderTextContentPresenter");
            Grid.SetColumnSpan(placeholderText, 3);//REVIEW:workitem:14747: WinUI: Remove work-around for AutoSuggestBox bug
        }

@gabbybilka gabbybilka added team-Controls Issue for the Controls team area-AutoSuggestBox product-winui3 WinUI 3 issues bug Something isn't working labels Aug 19, 2022
@bpulliam bpulliam removed the needs-triage Issue needs to be triaged by the area owners label Dec 7, 2022
@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2023
@myokeeh
Copy link
Author

myokeeh commented Aug 4, 2023

.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-AutoSuggestBox bug Something isn't working no-issue-activity product-winui3 WinUI 3 issues team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

4 participants