/// <summary> /// Loads the document template. /// </summary> /// <returns>DependencyObject.</returns> /// <exception cref="System.NotImplementedException"></exception> public DependencyObject LoadDocumentTemplate() { if (DocumentVisualTree == null) return null; var root = DocumentVisualTree; var expressions = new List<BindingToSet>(); var newInstance = CloneObject(root, null, expressions); newInstance.SetValue(DocEx.ForceRefreshExpressionProperty, expressions); var fragment = new DocumentFragment {Content = newInstance as FrameworkContentElement}; return fragment; }
/// <summary> /// Loads the document template. /// </summary> /// <returns>DependencyObject.</returns> /// <exception cref="System.NotImplementedException"></exception> public DependencyObject LoadDocumentTemplate() { if (DocumentVisualTree == null) { return(null); } var root = DocumentVisualTree; var expressions = new List <BindingToSet>(); var newInstance = CloneObject(root, null, expressions); newInstance.SetValue(DocEx.ForceRefreshExpressionProperty, expressions); var fragment = new DocumentFragment { Content = newInstance as FrameworkContentElement }; return(fragment); }