protected override void OnApplyTemplate() { base.OnApplyTemplate(); _contentPresenter = GetTemplateChild("ContentPresenter") as WContentPresenter; _rootGrid = GetTemplateChild("RootGrid") as Microsoft.UI.Xaml.Controls.Grid; UpdateBackgroundColor(); UpdateBorderRadius(); }
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); }