void OnLoaded(object sender, UI.Xaml.RoutedEventArgs e) { _queryTextBox = NativeView?.GetFirstDescendant <MauiTextBox>(); _cancelButton = _queryTextBox?.GetFirstDescendant <MauiCancelButton>(); if (_cancelButton != null) { if (_defaultDeleteButtonBackgroundColorBrush == null) { _defaultDeleteButtonBackgroundColorBrush = _cancelButton.Background; } if (_defaultDeleteButtonForegroundColorBrush == null) { _defaultDeleteButtonForegroundColorBrush = _cancelButton.Foreground; } // The Cancel button's content won't be loaded right away (because the default Visibility is Collapsed) // So we need to wait until it's ready, then force an update of the button color _cancelButton.ReadyChanged += (o, args) => { if (VirtualView != null) { NativeView?.UpdateCancelButtonColor(VirtualView, _cancelButton, _defaultDeleteButtonBackgroundColorBrush, _defaultDeleteButtonForegroundColorBrush); } }; } if (VirtualView != null) { NativeView?.UpdateHorizontalTextAlignment(VirtualView, _queryTextBox); NativeView?.UpdateMaxLength(VirtualView, _queryTextBox); } }
void NativeViewGotFocus(object sender, UI.Xaml.RoutedEventArgs e) { if (VirtualView != null) { VirtualView.IsFocused = true; } }
void OnToggled(object sender, UI.Xaml.RoutedEventArgs e) { if (VirtualView == null || NativeView == null) { return; } VirtualView.IsOn = NativeView.IsOn; }
void OnToggled(object sender, UI.Xaml.RoutedEventArgs e) { if (VirtualView is null || PlatformView is null || VirtualView.IsOn == PlatformView.IsOn) { return; } VirtualView.IsOn = PlatformView.IsOn; }
void OnLoaded(object sender, UI.Xaml.RoutedEventArgs e) { if (VirtualView != null) { PlatformView?.UpdateTextColor(VirtualView); PlatformView?.UpdatePlaceholderColor(VirtualView); PlatformView?.UpdateHorizontalTextAlignment(VirtualView); PlatformView?.UpdateMaxLength(VirtualView); } }
void OnClick(object sender, UI.Xaml.RoutedEventArgs e) { VirtualView?.Clicked(); VirtualView?.Released(); }
void OnClicked(object sender, UI.Xaml.RoutedEventArgs e) { VirtualView.Clicked(); }
private void IrItemContentControl_Loaded(object sender, UI.Xaml.RoutedEventArgs e) { Data.virtualListView.ViewSelector.ViewAttached(Data.position, View); }
private void OnLoaded(object sender, UI.Xaml.RoutedEventArgs e) { UpdateValue(nameof(Shell.FlyoutBackground)); }