1using System.Collections.ObjectModel;
2using CommunityToolkit.Mvvm.Input;
11 [XamlCompilation(XamlCompilationOptions.Compile)]
20 this.ContentPageModel = ViewModel;
22 this.InitializeComponent();
24 ViewModel.TagSelected += this.OnTagSelected;
31 MainThread.BeginInvokeOnMainThread(async () =>
33 HorizontalStackLayout filterLayout = this.FindByName<HorizontalStackLayout>(
"FilterTagsLayout");
34 ScrollView filterScroll = this.FindByName<ScrollView>(
"FilterTagsScroll");
35 if (filterLayout is
null || filterScroll is
null)
38 foreach (
object child
in filterLayout.Children)
40 if (child is VisualElement ve && ve.BindingContext == tag)
42 await filterScroll.ScrollToAsync(ve, ScrollToPosition.Center,
true);
54 private void ContractsSearchChanged(
object? Sender, TextChangedEventArgs e)
58 MainThread.BeginInvokeOnMainThread(() =>
Base class that references services in the app.
static ILogService LogService
Log service.
static INavigationService NavigationService
The navigation service for navigating between pages.
Holds navigation parameters specific to views displaying a list of contacts.
A page that displays a list of the current user's contracts.
MyContractsPage()
Creates a new instance of the MyContractsPage class.
Container class representing a selectable category tag.
View model responsible for presenting and filtering a list of contracts and templates....
void UpdateSearch(string? text)
Should be called by page on text change.