示例#1
0
        protected override DocumentNode ProvideValue(out IList <DocumentCompositeNode> auxillaryResources)
        {
            auxillaryResources = (IList <DocumentCompositeNode>)null;
            StyleNode emptyStyle = StyleNode.CreateEmptyStyle(this.SceneViewModel, (IPropertyId)this.TargetProperty, (ITypeId)this.Type);
            ControlTemplateElement controlTemplateElement = (ControlTemplateElement)this.SceneViewModel.CreateSceneNode(PlatformTypes.ControlTemplate);

            controlTemplateElement.ControlTemplateTargetTypeId = (ITypeId)emptyStyle.StyleTargetTypeId;
            BaseFrameworkElement frameworkElement = (BaseFrameworkElement)this.SceneViewModel.CreateSceneNode(PlatformTypes.Grid);

            controlTemplateElement.DefaultInsertionPoint.Insert((SceneNode)frameworkElement);
            emptyStyle.SetValue(ControlElement.TemplateProperty, (object)controlTemplateElement.DocumentNode);
            return(emptyStyle.DocumentNode);
        }
示例#2
0
 protected override DocumentNode ProvideValue(out IList <DocumentCompositeNode> auxillaryResources)
 {
     auxillaryResources = (IList <DocumentCompositeNode>)null;
     return(StyleNode.CreateEmptyStyle(this.SceneViewModel, (IPropertyId)this.TargetProperty, (ITypeId)this.Type).DocumentNode);
 }