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

            _contentPresenter = GetTemplateChild("ContentPresenter") as WContentPresenter;
            _rootGrid         = GetTemplateChild("RootGrid") as Microsoft.UI.Xaml.Controls.Grid;

            UpdateBackgroundColor();
            UpdateBorderRadius();
        }
Exemple #2
0
        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

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

            _titleViewPresenter = GetTemplateChild("TitleViewPresenter") as FrameworkElement;

            _commandBar = GetTemplateChild("CommandBar") as CommandBar;

            _titleViewManager = new TitleViewManager(this);

            _toolbarPlacementHelper.Initialize(_commandBar, () => ToolbarPlacement, GetTemplateChild);
            UpdateToolbarDynamicOverflowEnabled();

            TaskCompletionSource <CommandBar> tcs = _commandBarTcs;

            tcs?.SetResult(_commandBar);
        }