Example #1
0
        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            _commandBar = GetTemplateChild("CommandBar") as CommandBar;

#if WINDOWS_UWP
            _toolbarPlacementHelper.Initialize(_commandBar, () => ToolbarPlacement, GetTemplateChild);
#endif

            TaskCompletionSource <CommandBar> tcs = _commandBarTcs;
            tcs?.SetResult(_commandBar);
        }
Example #2
0
        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            _backButton = GetTemplateChild("backButton") as AppBarButton;
            if (_backButton != null)
            {
                _backButton.Click += OnBackClicked;
            }

            _presenter = GetTemplateChild("presenter") as Windows.UI.Xaml.Controls.ContentPresenter;

            _commandBar = GetTemplateChild("CommandBar") as CommandBar;

#if WINDOWS_UWP
            _toolbarPlacementHelper.Initialize(_commandBar, () => ToolbarPlacement, GetTemplateChild);
#endif

            TaskCompletionSource <CommandBar> tcs = _commandBarTcs;
            tcs?.SetResult(_commandBar);
        }