public void ApplyActiveUserThemeStyle(SceneViewModel viewModel)
 {
     for (int index = 0; index < this.records.Count; ++index)
     {
         CanvasLikeDataViewLayoutBuilder.LabelField labelField = this.records[index];
         AssetLibrary.ApplyActiveUserThemeStyle(viewModel.GetSceneNode(labelField.Label));
         AssetLibrary.ApplyActiveUserThemeStyle(viewModel.GetSceneNode(labelField.Field));
     }
 }
Ejemplo n.º 2
0
        private void ApplyActiveUserThemeStyleToDataTemplate(DocumentCompositeNode dataTemplateNode)
        {
            if (dataTemplateNode == null)
            {
                return;
            }
            DocumentCompositeNode documentCompositeNode1 = dataTemplateNode.Properties[FrameworkTemplateElement.VisualTreeProperty] as DocumentCompositeNode;

            if (documentCompositeNode1 == null || documentCompositeNode1.Type.Metadata.DefaultContentProperty == null)
            {
                return;
            }
            DocumentCompositeNode documentCompositeNode2 = documentCompositeNode1.Properties[(IPropertyId)documentCompositeNode1.Type.Metadata.DefaultContentProperty] as DocumentCompositeNode;

            if (documentCompositeNode2 == null || !documentCompositeNode2.SupportsChildren)
            {
                return;
            }
            foreach (DocumentNode node in (IEnumerable <DocumentNode>)documentCompositeNode2.Children)
            {
                AssetLibrary.ApplyActiveUserThemeStyle(this.DragModel.ViewModel.GetSceneNode(node));
            }
        }