37 references to BackButtonBehavior
Microsoft.Maui.Controls (37)
BindableObject.cs (1)
396 if (Shell.GetBackButtonBehavior(this) is BackButtonBehavior buttonBehavior)
Compatibility\Handlers\Shell\iOS\ShellPageRendererTracker.cs (16)
69 BackButtonBehavior BackButtonBehavior { get; set; } 98 if (e.PropertyName == BackButtonBehavior.CommandParameterProperty.PropertyName) 100 else if (e.PropertyName == BackButtonBehavior.IsEnabledProperty.PropertyName) 327 var behavior = BackButtonBehavior; 329 var image = behavior.GetPropertyIfSet<ImageSource>(BackButtonBehavior.IconOverrideProperty, null); 330 var enabled = behavior.GetPropertyIfSet(BackButtonBehavior.IsEnabledProperty, true); 331 var text = behavior.GetPropertyIfSet<string>(BackButtonBehavior.TextOverrideProperty, null); 332 var command = behavior.GetPropertyIfSet<object>(BackButtonBehavior.CommandProperty, null); 333 var backButtonVisible = behavior.GetPropertyIfSet<bool>(BackButtonBehavior.IsVisibleProperty, true); 401 var behavior = BackButtonBehavior; 402 var text = behavior.GetPropertyIfSet<string>(BackButtonBehavior.TextOverrideProperty, null); 432 var behavior = BackButtonBehavior; 434 var command = behavior.GetPropertyIfSet<ICommand>(BackButtonBehavior.CommandProperty, null); 435 var commandParameter = behavior.GetPropertyIfSet<object>(BackButtonBehavior.CommandParameterProperty, null); 494 void SetBackButtonBehavior(BackButtonBehavior value) 515 bool isEnabled = BackButtonBehavior.GetPropertyIfSet<bool>(BackButtonBehavior.IsEnabledProperty, true);
Compatibility\Handlers\Shell\iOS\ShellSectionRenderer.cs (3)
117 var behavior = Shell.GetBackButtonBehavior(tracker.Value.Page); 118 var command = behavior.GetPropertyIfSet<ICommand>(BackButtonBehavior.CommandProperty, null); 119 var commandParameter = behavior.GetPropertyIfSet<object>(BackButtonBehavior.CommandParameterProperty, null);
Shell\BackButtonBehavior.cs (9)
12 BindableProperty.Create(nameof(CommandParameter), typeof(object), typeof(BackButtonBehavior), null, BindingMode.OneTime, 17 BindableProperty.Create(nameof(Command), typeof(ICommand), typeof(BackButtonBehavior), null, BindingMode.OneTime, 22 BindableProperty.Create(nameof(IconOverride), typeof(ImageSource), typeof(BackButtonBehavior), null, BindingMode.OneTime); 26 BindableProperty.Create(nameof(IsEnabled), typeof(bool), typeof(BackButtonBehavior), true, BindingMode.OneWay); 30 BindableProperty.Create(nameof(IsVisible), typeof(bool), typeof(BackButtonBehavior), true, BindingMode.OneWay); 34 BindableProperty.Create(nameof(TextOverride), typeof(string), typeof(BackButtonBehavior), null, BindingMode.OneTime); 81 var self = (BackButtonBehavior)bindable; 89 ((BackButtonBehavior)bindable).OnCommandParameterChanged();
Shell\Shell.cs (6)
35 BindableProperty.CreateAttached("BackButtonBehavior", typeof(BackButtonBehavior), typeof(Shell), null, BindingMode.OneTime, 40 if (oldValue is BackButtonBehavior oldHandlerProperties) 42 if (newValue is BackButtonBehavior newHandlerProperties) 189 public static BackButtonBehavior GetBackButtonBehavior(BindableObject obj) => (BackButtonBehavior)obj.GetValue(BackButtonBehaviorProperty); 199 public static void SetBackButtonBehavior(BindableObject obj, BackButtonBehavior behavior) => obj.SetValue(BackButtonBehaviorProperty, behavior);
ShellToolbar.cs (2)
15 BackButtonBehavior? _backButtonBehavior; 130 var bbb = Shell.GetBackButtonBehavior(_currentPage);