Exemplo n.º 1
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            var edit = this.GetTemplateChild("edit") as ButtonBase;
            if (edit != null)
            {
                edit.Click += (s, e) =>
                    {
                        var branchEdit = new BranchEdit();
                        branchEdit.DataContext = this.Branch;
                        branchEdit.Show();
                    };
            }

            this.titlePanel = this.GetTemplateChild("titlePanel") as Border;

            if (this.Branch.ParentBranch != null)
                this.BindDragEvent();
        }
Exemplo n.º 2
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            var edit = this.GetTemplateChild("edit") as ButtonBase;

            if (edit != null)
            {
                edit.Click += (s, e) =>
                {
                    var branchEdit = new BranchEdit();
                    branchEdit.DataContext = this.Branch;
                    branchEdit.Show();
                };
            }

            this.titlePanel = this.GetTemplateChild("titlePanel") as Border;

            if (this.Branch.ParentBranch != null)
            {
                this.BindDragEvent();
            }
        }