Exemple #1
0
        private void Rebuild()
        {
            this.Unload();
            SceneNodePropertyValue nodePropertyValue = this.DataContext as SceneNodePropertyValue;

            if (nodePropertyValue == null)
            {
                return;
            }
            this.sceneNodeObjectSet  = ((SceneNodeProperty)nodePropertyValue.get_ParentProperty()).SceneNodeObjectSet;
            this.projectContext      = this.sceneNodeObjectSet.ProjectContext;
            this.projectFontFamilies = this.projectContext.ProjectFonts;
            this.projectFontFamilies.CollectionChanged += new NotifyCollectionChangedEventHandler(this.projectFontFamilies_CollectionChanged);
            this.fontFamilyEditor.FontFamilies          = FontFamilyValueEditor.GetFontFamilies(this.sceneNodeObjectSet);
            SelectedElementsObjectSet elementsObjectSet = this.sceneNodeObjectSet as SelectedElementsObjectSet;

            if (elementsObjectSet == null)
            {
                return;
            }
            elementsObjectSet.ViewModelChanged += new EventHandler(this.objectSet_ViewModelChanged);
        }
Exemple #2
0
 public static List <SourcedFontFamilyItem> GetFontFamilies(SceneNodeObjectSet sceneNodeObjectSet)
 {
     return(FontFamilyValueEditor.GetFontFamilies(FontEmbedder.GetSystemFonts(sceneNodeObjectSet.DocumentContext.TypeResolver), (ICollection <IProjectFont>)sceneNodeObjectSet.ProjectContext.ProjectFonts, sceneNodeObjectSet));
 }