internal static ShellItem CreateFromShellSection(ShellSection shellSection) { if (shellSection.Parent != null) { return((ShellItem)shellSection.Parent); } ShellItem result = null; if (shellSection is Tab) { result = new TabBar(); } else { result = new ShellItem(); } result.Route = Routing.GenerateImplicitRoute(shellSection.Route); result.Items.Add(shellSection); result.SetBinding(TitleProperty, new Binding(nameof(Title), BindingMode.OneWay, source: shellSection)); result.SetBinding(IconProperty, new Binding(nameof(Icon), BindingMode.OneWay, source: shellSection)); result.SetBinding(FlyoutDisplayOptionsProperty, new Binding(nameof(FlyoutDisplayOptions), BindingMode.OneTime, source: shellSection)); result.SetBinding(FlyoutIconProperty, new Binding(nameof(FlyoutIcon), BindingMode.OneWay, source: shellSection)); return(result); }
public TabBarHandler(NativeComponentRenderer renderer, XF.TabBar tabBarControl) : base(renderer, tabBarControl) { TabBarControl = tabBarControl ?? throw new ArgumentNullException(nameof(tabBarControl)); Initialize(renderer); }