Esempio 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();
        }
Esempio 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();
            }
        }