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

AutoSuggestionBox not working #1361

Open
Hamo61 opened this issue Feb 23, 2025 · 2 comments
Open

AutoSuggestionBox not working #1361

Hamo61 opened this issue Feb 23, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@Hamo61
Copy link

Hamo61 commented Feb 23, 2025

Describe the bug

Hi,
i tried different ways to use the AutoSuggestionBox. Sadly I couldnt make it work. It never shows me a suggestion. I have the feeling that OnPropertyChanged event is not rised or caught. Im debugging the resulted counts and this works

To Reproduce

I tried different solutions.

Expected behavior

Showning the suggested items

Screenshots

No response

OS version

Windows 10

.NET version

8.0

WPF-UI NuGet version

4.0.0

Additional context

No response

@Hamo61 Hamo61 added the bug Something isn't working label Feb 23, 2025
@Hamo61
Copy link
Author

Hamo61 commented Feb 27, 2025

you can see the behavior when you got to the gui and then to icons. us the search field. something will drop but you cant see any results

@chucker
Copy link
Collaborator

chucker commented Feb 27, 2025

Notice that it does work in the AutoSuggestBox example in the gallery. The difference is that it sets OriginalItemsSource="{Binding ViewModel.AutoSuggestBoxSuggestions, Mode=OneWay}". If we set an OriginalItemsSource and the DisplayMemberPath:

            <ui:AutoSuggestBox
                Grid.Column="0"
                MinWidth="320"
                Margin="0,4,0,0"
                HorizontalAlignment="Left"
                DisplayMemberPath="Name"
                OriginalItemsSource="{Binding ViewModel.IconsCollection}"
                PlaceholderText="Search icons"
                Text="{Binding ViewModel.AutoSuggestBoxText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

…then it does work:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants