Пример #1
0
        public override void OnApplyTemplate()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
            {
                return;
            }

            this.DataContext = this.viewModel = new TitleBarViewModel(this);
        }
Пример #2
0
        /// <summary>
        /// Disposing the resources.
        /// </summary>
        /// <param name="disposing">true or false</param>
        private void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (this.viewModel != null)
                {
                    this.viewModel.Dispose();
                    this.viewModel = null;
                }

                if (this.primaryLeft != null)
                {
                    this.primaryLeft.Dispose();
                    this.primaryLeft = null;
                }

                if (this.primaryCenter != null)
                {
                    this.primaryCenter.Dispose();
                    this.primaryCenter = null;
                }

                if (this.primaryRight != null)
                {
                    this.primaryRight.Dispose();
                    this.primaryRight = null;
                }

                if (this.SecLeft != null)
                {
                    this.SecLeft.Dispose();
                    this.SecLeft = null;
                }

                if (this.SecCenter != null)
                {
                    this.SecCenter.Dispose();
                    this.SecCenter = null;
                }

                if (this.SecRight != null)
                {
                    this.SecRight.Dispose();
                    this.SecRight = null;
                }
            }
        }