コード例 #1
0
ファイル: FormsButton.cs プロジェクト: zmtzawqlp/maui
        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

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

            UpdateBackgroundColor();
            UpdateBorderRadius();
        }
コード例 #2
0
        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            _presenter = GetTemplateChild("presenter") as global::Windows.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);
        }