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) 322 var behavior = BackButtonBehavior; 324 var image = behavior.GetPropertyIfSet<ImageSource>(BackButtonBehavior.IconOverrideProperty, null); 325 var enabled = behavior.GetPropertyIfSet(BackButtonBehavior.IsEnabledProperty, true); 326 var text = behavior.GetPropertyIfSet<string>(BackButtonBehavior.TextOverrideProperty, null); 327 var command = behavior.GetPropertyIfSet<object>(BackButtonBehavior.CommandProperty, null); 328 var backButtonVisible = behavior.GetPropertyIfSet<bool>(BackButtonBehavior.IsVisibleProperty, true); 396 var behavior = BackButtonBehavior; 397 var text = behavior.GetPropertyIfSet<string>(BackButtonBehavior.TextOverrideProperty, null); 427 var behavior = BackButtonBehavior; 429 var command = behavior.GetPropertyIfSet<ICommand>(BackButtonBehavior.CommandProperty, null); 430 var commandParameter = behavior.GetPropertyIfSet<object>(BackButtonBehavior.CommandParameterProperty, null); 489 void SetBackButtonBehavior(BackButtonBehavior value) 510 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);