-
-
Notifications
You must be signed in to change notification settings - Fork 20
Add search filter to sample pages #115
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
Add search filter to sample pages #115
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a search filter to the sample pages by introducing a search box above the tab list and dynamically filtering the tabs based on input.
- Added a SearchBox and a NoMatchesText control to MainView.axaml.
- Created an OnSearchTextChanged event handler in MainView.axaml.cs to filter tab items and display a message when no match is found.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| samples/BehaviorsTestApplication/Views/MainView.axaml.cs | Introduced OnSearchTextChanged that implements dynamic tab filtering logic. |
| samples/BehaviorsTestApplication/Views/MainView.axaml | Modified the layout to include a search box and a message for no matches, wrapping the TabControl within a DockPanel. |
Comments suppressed due to low confidence (1)
samples/BehaviorsTestApplication/Views/MainView.axaml.cs:13
- The removal of the AvaloniaXamlLoader.Load(this) call (previously in InitializeComponent) may result in UI components not being properly loaded. Verify that the view initialization occurs as expected elsewhere or reinstate the call in the constructor.
private void OnSearchTextChanged(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
Summary
Testing
dotnet test AvaloniaBehaviors.sln --no-build(fails:dotnetnot found)