/// <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); }
/// <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); }