示例#1
0
        /// <summary>
        /// Loads the control's component root from the control's associated template.
        /// </summary>
        private void LoadComponentRoot()
        {
            if (componentRoot != null)
            {
                throw new InvalidOperationException(PresentationStrings.ComponentRootAlreadyLoaded);
            }

            this.ComponentRoot = UvmlLoader.LoadComponentTemplate(this);
        }
示例#2
0
        /// <summary>
        /// Loads the control's component root from the control's associated template.
        /// </summary>
        private void LoadComponentRoot()
        {
            if (componentRoot != null)
            {
                throw new InvalidOperationException(PresentationStrings.ComponentRootAlreadyLoaded);
            }

            var template = Ultraviolet.GetUI().GetPresentationFoundation().ComponentTemplates.Get(this);

            if (template == null)
            {
                return;
            }

            this.ComponentRoot = UvmlLoader.LoadComponentTemplate(this, template);
        }