예제 #1
0
        public void FixupIndividualReference(DocumentCompositeNode resource, SceneNode reference)
        {
            switch (this.updateMethod)
            {
            case ReferencesFoundModel.UpdateMethod.UpdateReferences:
                DocumentNode node = reference.DocumentContext.CreateNode(this.newKey.GetType(), this.newKey);
                ResourceNodeHelper.SetResourceKey((DocumentCompositeNode)reference.DocumentNode, node);
                IPropertyId propertyId1 = (IPropertyId)reference.Parent.GetPropertyForChild(reference);
                reference.Parent.SetValue(new PropertyReference((ReferenceStep)propertyId1), (object)reference.DocumentNode.Clone(reference.DocumentContext));
                break;

            case ReferencesFoundModel.UpdateMethod.ConvertToLocal:
                DocumentNode documentNode = resource.Properties[DictionaryEntryNode.ValueProperty].Clone(reference.DocumentContext);
                IPropertyId  propertyId2  = (IPropertyId)reference.Parent.GetPropertyForChild(reference);
                reference.Parent.SetValue(new PropertyReference((ReferenceStep)propertyId2), (object)documentNode);
                break;

            case ReferencesFoundModel.UpdateMethod.ResetToDefault:
                if (PlatformTypes.Setter.IsAssignableFrom((ITypeId)reference.Parent.Type))
                {
                    reference.Parent.Remove();
                    break;
                }
                IPropertyId propertyKey = (IPropertyId)reference.Parent.GetPropertyForChild(reference);
                reference.Parent.ClearLocalValue(propertyKey);
                break;
            }
        }
 public ScreenNameReferenceVerifier(DesignerContext designerContext, ITypeId referentialObjectType, IPropertyId referentialProperty, bool allowNullOrEmpty)
 {
     this.designerContext       = designerContext;
     this.referentialObjectType = referentialObjectType;
     this.referentialProperty   = referentialProperty;
     this.allowNullOrEmpty      = allowNullOrEmpty;
 }
예제 #3
0
        public bool ContainsInvalidProperty(IPropertyId propertyKey)
        {
            bool flag;

            if (this.invalidProperties != null)
            {
                List <IProperty> .Enumerator enumerator = this.invalidProperties.GetEnumerator();
                try
                {
                    while (enumerator.MoveNext())
                    {
                        if (!enumerator.Current.Equals(propertyKey))
                        {
                            continue;
                        }
                        flag = true;
                        return(flag);
                    }
                    return(false);
                }
                finally
                {
                    ((IDisposable)enumerator).Dispose();
                }
                return(flag);
            }
            return(false);
        }
예제 #4
0
 public TriggerSetterNodeReference(BaseTriggerNode trigger, DocumentCompositeNode parent, IPropertyId propertyKey, bool visualTriggerOnly)
 {
     this.trigger           = trigger;
     this.parent            = parent;
     this.propertyKey       = propertyKey;
     this.visualTriggerOnly = visualTriggerOnly;
 }
예제 #5
0
        private void ApplyResourceOnExistingElement(SceneElement targetElement, IPropertyId targetProperty, ResourceEntryItem resource)
        {
            if (resource.Resource.KeyNode != null || targetProperty.Equals((object)BaseFrameworkElement.StyleProperty))
            {
                using (SceneEditTransaction editTransaction = this.ActiveDocument.CreateEditTransaction(string.Format((IFormatProvider)CultureInfo.CurrentCulture, StringTable.PropertySetUndo, new object[1]
                {
                    (object)targetProperty.Name
                })))
                {
                    if (resource.Resource.KeyNode != null)
                    {
                        IDocumentContext documentContext = this.ActiveSceneViewModel.Document.DocumentContext;
                        IProjectContext  projectContext  = this.ActiveSceneViewModel.Document.ProjectContext;
                        DocumentNode     keyNode         = resource.Resource.KeyNode.Clone(documentContext);
                        DocumentNode     documentNode    = !(projectContext.ResolveProperty(targetProperty) is DependencyPropertyReferenceStep) || !JoltHelper.TypeSupported((ITypeResolver)projectContext, PlatformTypes.DynamicResource) ? (DocumentNode)DocumentNodeUtilities.NewStaticResourceNode(documentContext, keyNode) : (DocumentNode)DocumentNodeUtilities.NewDynamicResourceNode(documentContext, keyNode);
                        targetElement.SetValue(targetProperty, (object)documentNode);
                    }
                    else if (targetProperty.Equals((object)BaseFrameworkElement.StyleProperty))
                    {
                        targetElement.ClearValue(targetProperty);
                    }
                    editTransaction.Commit();
                }
            }
            ResourceManager   resourceManager   = this.ActiveSceneViewModel.DesignerContext.ResourceManager;
            DocumentReference documentReference = resource.Container.DocumentReference;

            if (resource.Resource.IsResourceReachable((SceneNode)targetElement) || !(documentReference != resourceManager.ActiveRootContainer.DocumentReference) || !(documentReference != resourceManager.TopLevelResourceContainer.DocumentReference))
            {
                return;
            }
            resourceManager.LinkToResource(resourceManager.TopLevelResourceContainer, documentReference);
        }
예제 #6
0
        private Dictionary <KeyValuePair <SceneElement, IPropertyId>, SceneElementCollection> SortSelectionByParentAndZOrder(ICollection <SceneElement> selection)
        {
            Dictionary <KeyValuePair <SceneElement, IPropertyId>, SceneElementCollection> dictionary = new Dictionary <KeyValuePair <SceneElement, IPropertyId>, SceneElementCollection>();

            foreach (SceneElement sceneElement in (IEnumerable <SceneElement>)selection)
            {
                SceneElement parentElement = sceneElement.ParentElement;
                IPropertyId  propertyId    = (IPropertyId)parentElement.GetPropertyForChild((SceneNode)sceneElement);
                KeyValuePair <SceneElement, IPropertyId> key = new KeyValuePair <SceneElement, IPropertyId>(parentElement, propertyId);
                SceneElementCollection elementCollection;
                if (!dictionary.TryGetValue(key, out elementCollection))
                {
                    elementCollection = new SceneElementCollection();
                    dictionary.Add(key, elementCollection);
                }
                elementCollection.Add(sceneElement);
            }
            if (this.requiresSortedList)
            {
                ZOrderComparer <SceneElement> zorderComparer = new ZOrderComparer <SceneElement>(this.SceneViewModel.RootNode);
                foreach (KeyValuePair <KeyValuePair <SceneElement, IPropertyId>, SceneElementCollection> keyValuePair in dictionary)
                {
                    keyValuePair.Value.Sort((IComparer <SceneElement>)zorderComparer);
                }
            }
            return(dictionary);
        }
예제 #7
0
        public static int RegisterDesignTimeProperty(IPropertyId property)
        {
            int uniqueSortValue = PropertySortValue.GetUniqueSortValue(string.Concat("__BLEND", property.Name), PropertySortValue.DesignTimeSeedSortValue);

            PropertySortValue.sortValues.Add(uniqueSortValue);
            return(uniqueSortValue);
        }
 static VisualTransitionMetadata()
 {
     VisualTransitionMetadata.FromStateNameProperty     = (IPropertyId)ProjectNeutralTypes.VisualTransition.GetMember(MemberType.LocalProperty, "From", MemberAccessTypes.Public);
     VisualTransitionMetadata.ToStateNameProperty       = (IPropertyId)ProjectNeutralTypes.VisualTransition.GetMember(MemberType.LocalProperty, "To", MemberAccessTypes.Public);
     VisualTransitionMetadata.GeneratedDurationProperty = (IPropertyId)ProjectNeutralTypes.VisualTransition.GetMember(MemberType.LocalProperty, "GeneratedDuration", MemberAccessTypes.Public);
     VisualTransitionMetadata.StoryboardProperty        = (IPropertyId)ProjectNeutralTypes.VisualTransition.GetMember(MemberType.LocalProperty, "Storyboard", MemberAccessTypes.Public);
 }
예제 #9
0
 public bool PathReevaluates(ExpressionEvaluator evaluator)
 {
     if (!this.IsValid(true))
     {
         return(false);
     }
     for (int i = this.nodes.Count - 1; i > 0; i--)
     {
         DocumentNode target = this.nodes[i - 1].Target;
         if (target != null)
         {
             DocumentCompositeNode documentCompositeNode = target as DocumentCompositeNode;
             IPropertyId           propertyKey           = this.nodes[i].PropertyKey;
             if (documentCompositeNode != null && propertyKey != null)
             {
                 DocumentNode item = documentCompositeNode.Properties[propertyKey];
                 if (item != null && item.Type.IsExpression)
                 {
                     item = evaluator.EvaluateExpression(this.GetSubpath(i), item);
                 }
                 if (item == null || item != this.nodes[i].Container)
                 {
                     return(false);
                 }
             }
         }
     }
     return(true);
 }
예제 #10
0
        protected override void SetMarginChanges()
        {
            double num1 = (double)this.Child.GetComputedValue(CanvasElement.LeftProperty);
            double num2 = (double)this.Child.GetComputedValue(CanvasElement.TopProperty);

            if (num1 != this.ChildRect.Left)
            {
                IPropertyId propertyKey = (IPropertyId)this.Child.ViewModel.ProjectContext.ResolveProperty(CanvasElement.RightProperty);
                if (this.ChildRect.Left == 0.0 && (propertyKey == null || double.IsNaN((double)this.Child.GetComputedValue(propertyKey))))
                {
                    this.Child.ClearValue(CanvasElement.LeftProperty);
                }
                else
                {
                    this.Child.SetValue(CanvasElement.LeftProperty, (object)this.ChildRect.Left);
                }
            }
            if (num2 != this.ChildRect.Top)
            {
                IPropertyId propertyKey = (IPropertyId)this.Child.ViewModel.ProjectContext.ResolveProperty(CanvasElement.BottomProperty);
                if (this.ChildRect.Top == 0.0 && (propertyKey == null || double.IsNaN((double)this.Child.GetComputedValue(propertyKey))))
                {
                    this.Child.ClearValue(CanvasElement.TopProperty);
                }
                else
                {
                    this.Child.SetValue(CanvasElement.TopProperty, (object)this.ChildRect.Top);
                }
            }
            base.SetMarginChanges();
        }
예제 #11
0
 public void OnContentChanged(IPropertyId propertyKey)
 {
     if (VisualStateTransitionSceneNode.FromStateNameProperty.Equals((object)propertyKey))
     {
         this.NotifyPropertyChanged("FromStateName");
         this.NotifyPropertyChanged("IsDefaultTransition");
     }
     else if (VisualStateTransitionSceneNode.ToStateNameProperty.Equals((object)propertyKey))
     {
         this.NotifyPropertyChanged("ToStateName");
         this.NotifyPropertyChanged("IsDefaultTransition");
         this.NotifyPropertyChanged("AutomationId");
     }
     else if (VisualStateTransitionSceneNode.GeneratedEasingFunctionProperty.Equals((object)propertyKey))
     {
         this.NotifyPropertyChanged("GeneratedEasingFunction");
     }
     else
     {
         if (!VisualStateManagerSceneNode.TransitionEffectProperty.Equals((object)propertyKey))
         {
             return;
         }
         this.NotifyPropertyChanged("TransitionEffect");
     }
 }
예제 #12
0
 protected override void CopyProperty(IPropertyId propertyId)
 {
     if (propertyId.Equals((object)this.ResolveProperty(RichTextBoxRangeElement.TextBlockLineHeightPropertyId)))
     {
         System.Windows.Controls.RichTextBox richTextBox = this.RichTextBox.PlatformSpecificObject as System.Windows.Controls.RichTextBox;
         object computedValueAsWpf = this.TextSource.GetComputedValueAsWpf(RichTextBoxRangeElement.TextBlockLineHeightPropertyId);
         if (richTextBox == null || !(computedValueAsWpf is double))
         {
             return;
         }
         double num = (double)computedValueAsWpf;
         TextBlock.SetLineHeight((DependencyObject)richTextBox, num);
     }
     else if (propertyId.Equals((object)this.ResolveProperty(RichTextBoxRangeElement.TextBlockTextAlignmentPropertyId)))
     {
         System.Windows.Controls.RichTextBox richTextBox = this.RichTextBox.PlatformSpecificObject as System.Windows.Controls.RichTextBox;
         object computedValueAsWpf = this.TextSource.GetComputedValueAsWpf(RichTextBoxRangeElement.TextBlockTextAlignmentPropertyId);
         if (richTextBox == null || !(computedValueAsWpf is TextAlignment))
         {
             return;
         }
         TextAlignment textAlignment = (TextAlignment)computedValueAsWpf;
         TextBlock.SetTextAlignment((DependencyObject)richTextBox, textAlignment);
     }
     else
     {
         base.CopyProperty(propertyId);
     }
 }
예제 #13
0
        private static bool SearchForAnimationsInVisualStateGroups(DocumentCompositeNode elementNode, DocumentNode pathNameNode)
        {
            bool        flag;
            IPropertyId member   = (IPropertyId)ProjectNeutralTypes.VisualStateManager.GetMember(MemberType.AttachedProperty, "VisualStateGroups", MemberAccessTypes.Public);
            IProperty   property = elementNode.Context.TypeResolver.ResolveProperty(member);

            if (property != null)
            {
                DocumentCompositeNode item = elementNode.Properties[property] as DocumentCompositeNode;
                if (item != null && item.Children != null)
                {
                    using (IEnumerator <DocumentNode> enumerator = item.FindPointAnimationDescendantNodes().GetEnumerator())
                    {
                        while (enumerator.MoveNext())
                        {
                            if (!PathGeometrySerializationHelper.DoesAnimationTargetPath(pathNameNode, enumerator.Current))
                            {
                                continue;
                            }
                            flag = true;
                            return(flag);
                        }
                        return(false);
                    }
                    return(flag);
                }
            }
            return(false);
        }
        public static void Cleanup(SceneNode sceneNode)
        {
            SceneElement element = sceneNode as SceneElement;

            if (element != null)
            {
                sceneNode.ViewModel.AnimationEditor.DeleteAllAnimationsInSubtree(element);
                sceneNode.ViewModel.RemoveElement((SceneNode)element);
            }
            else
            {
                if (sceneNode == null || !sceneNode.ShouldClearAnimation)
                {
                    return;
                }
                SceneElement sceneElement = sceneNode.Parent as SceneElement;
                if (sceneElement == null)
                {
                    return;
                }
                IPropertyId       propertyId = (IPropertyId)sceneElement.GetPropertyForChild(sceneNode);
                PropertyReference property   = new PropertyReference((ReferenceStep)sceneElement.ProjectContext.ResolveProperty(propertyId));
                sceneNode.ViewModel.AnimationEditor.DeleteAllAnimationsInPropertySubtree((SceneNode)sceneElement, property);
            }
        }
예제 #15
0
            private SceneNode ProcessChild(SceneNode node, object child)
            {
                SceneNode sceneNode1 = child as SceneNode;

                if (sceneNode1 != null)
                {
                    return(sceneNode1);
                }
                IPropertyId propertyKey = (IPropertyId)child;
                SceneNode   sceneNode2  = node.GetLocalValueAsSceneNode(propertyKey);

                if (sceneNode2 == null)
                {
                    DocumentCompositeNode documentCompositeNode = node.DocumentNode as DocumentCompositeNode;
                    if (documentCompositeNode != null)
                    {
                        DocumentNode node1 = documentCompositeNode.Properties[propertyKey];
                        if (node1 != null)
                        {
                            sceneNode2 = node.ViewModel.GetSceneNode(node1);
                        }
                    }
                }
                return(sceneNode2);
            }
예제 #16
0
 private bool ReparentDraggedElements()
 {
     if (!this.InsertionPoint.IsEmpty)
     {
         IPropertyId pointChildProperty = this.GetInsertionPointChildProperty();
         if (pointChildProperty != null)
         {
             ISceneNodeCollection <SceneNode> collectionForProperty = this.InsertionPoint.Element.GetCollectionForProperty(pointChildProperty);
             if (collectionForProperty != null)
             {
                 this.AdjustIndexBeforeRemovingFromSceneView();
                 HashSet <BaseFrameworkElement> hashSet = new HashSet <BaseFrameworkElement>();
                 foreach (BaseFrameworkElement frameworkElement in this.DraggedElements)
                 {
                     hashSet.Add(frameworkElement);
                     frameworkElement.Remove();
                 }
                 this.Context.Transaction.UpdateEditTransaction();
                 this.AdjustIndexAfterRemovingFromSceneView();
                 foreach (BaseFrameworkElement frameworkElement in this.DraggedElements)
                 {
                     this.InsertionPoint.Insert(collectionForProperty, (SceneElement)frameworkElement);
                     ++this.InsertionPoint.Index;
                 }
                 this.Context.Transaction.UpdateEditTransaction();
                 this.AdjustLayoutAfterReparenting((ICollection <BaseFrameworkElement>)hashSet);
                 return(true);
             }
         }
     }
     return(false);
 }
예제 #17
0
 public PathDiff(Base2DElement targetElement, IPropertyId pathProperty, PathDiffChangeList changeList)
 {
     this.targetElement    = targetElement;
     this.platformMetadata = targetElement.Platform.Metadata;
     this.pathProperty     = this.platformMetadata.ResolveProperty(pathProperty) as ReferenceStep;
     this.changeList       = changeList;
 }
예제 #18
0
        private void OnPropertyReferenceSceneChange(PropertyReferenceSceneChange e)
        {
            if (e.PropertyChanged == null || e.PropertyChanged.Count != 1 || e.Target == null)
            {
                return;
            }
            SceneElement targetElement = e.Target as SceneElement;

            if (targetElement == null)
            {
                return;
            }
            IPropertyId nameProperty = targetElement.NameProperty;

            if (nameProperty == null || !e.PropertyKey.Equals((object)nameProperty))
            {
                return;
            }
            Breadcrumb breadcrumb = this.FindBreadcrumb(targetElement);

            if (breadcrumb == null)
            {
                return;
            }
            breadcrumb.RefreshName();
        }
예제 #19
0
        public override void Instantiate()
        {
            base.Instantiate();
            TextBoxElement textBoxElement = (TextBoxElement)this.TextSource;

            this.TextBox.Text = textBoxElement.Text;
            IPropertyId propertyKey = (IPropertyId)textBoxElement.ProjectContext.ResolveProperty(TextBoxElement.TextWrappingProperty);

            if (propertyKey != null)
            {
                this.TextBox.TextWrapping = (TextWrapping)textBoxElement.GetComputedValue(propertyKey);
            }
            if (this.TextSource.ProjectContext.ResolveProperty(TextBoxElement.CaretBrushProperty) != null)
            {
                this.CopyProperty(TextBoxElement.CaretBrushProperty);
            }
            if (this.TextSource.ProjectContext.IsCapabilitySet(PlatformCapability.IsWpf))
            {
                return;
            }
            Thickness padding = this.TextBox.Padding;

            padding.Left        -= 2.0;
            padding.Right       -= 2.0;
            padding.Bottom      -= 3.0;
            this.TextBox.Padding = padding;
        }
예제 #20
0
        internal static IPropertyId RefineDataContextProperty(SceneNode target, IPropertyId targetProperty, DocumentNode dataNode)
        {
            if (targetProperty.MemberType == MemberType.DesignTimeProperty || !DataContextHelper.IsDataContextProperty(target.DocumentNode, targetProperty))
            {
                return(targetProperty);
            }
            SampleNonBasicType sampleNonBasicType = dataNode.Type as SampleNonBasicType;

            if (sampleNonBasicType != null)
            {
                if (!sampleNonBasicType.DeclaringDataSet.IsEnabledAtRuntime)
                {
                    return(DesignTimeProperties.DesignDataContextProperty);
                }
                if (((DocumentCompositeNode)target.DocumentNode).Properties[targetProperty] != null)
                {
                    DataContextInfo dataContextInfo = new DataContextEvaluator().Evaluate(target, targetProperty, true);
                    if (dataContextInfo.DataSource != null && !(dataContextInfo.DataSource.DataSourceType is SampleNonBasicType))
                    {
                        return(DesignTimeProperties.DesignDataContextProperty);
                    }
                }
                return(targetProperty);
            }
            if (PlatformTypes.IsExpressionInteractiveType(dataNode.Type.RuntimeType))
            {
                return(DesignTimeProperties.DesignDataContextProperty);
            }
            return(targetProperty);
        }
예제 #21
0
        public SceneNode CreateBindingOrData(SceneNode target, IPropertyId targetProperty, DataSchemaNodePath bindingPath, bool useSourceInherited)
        {
            BindingSceneNode bindingSceneNode;

            if (!useSourceInherited || !this.SetSourceAsDataContext(target, targetProperty, ref bindingPath, false))
            {
                SceneNode dataSource = this.CreateDataSource(target, bindingPath, false);
                bindingSceneNode = dataSource as BindingSceneNode;
                if (bindingSceneNode == null)
                {
                    return(dataSource);
                }
            }
            else
            {
                bindingSceneNode = BindingSceneNode.Factory.Instantiate(target.ViewModel);
            }
            string path = bindingPath.Path;

            if (bindingPath.Schema is XmlSchema)
            {
                bindingSceneNode.XPath = path;
            }
            else if (!string.IsNullOrEmpty(path))
            {
                bindingSceneNode.SetPath(path);
            }
            BindingModeInfo defaultBindingMode = BindingPropertyHelper.GetDefaultBindingMode(target.DocumentNode, targetProperty, bindingPath);

            if (!defaultBindingMode.IsOptional)
            {
                bindingSceneNode.Mode = defaultBindingMode.Mode;
            }
            return((SceneNode)bindingSceneNode);
        }
예제 #22
0
        private EventHandlerModel EventSubscription_Inserted(object sender, SceneNode basisNode, object basisContent, SceneNode newPathNode)
        {
            DocumentCompositeNode documentCompositeNode = newPathNode.Parent.DocumentNode as DocumentCompositeNode;
            EventHandlerModel     eventHandlerModel1    = (EventHandlerModel)null;

            if (documentCompositeNode != null)
            {
                IPropertyId propertyId = (IPropertyId)newPathNode.Parent.GetPropertyForChild(newPathNode);
                if (propertyId is IEvent)
                {
                    foreach (EventHandlerModel eventHandlerModel2 in (IEnumerable <EventHandlerModel>) this.EventHandlers)
                    {
                        if (eventHandlerModel2.EventKey == propertyId)
                        {
                            eventHandlerModel1 = eventHandlerModel2;
                            break;
                        }
                    }
                    if (eventHandlerModel1 != null)
                    {
                        eventHandlerModel1.Refresh();
                    }
                }
            }
            return(eventHandlerModel1);
        }
예제 #23
0
 protected bool DoesStyleOrTemplateApply(IPropertyId styleOrTemplateProperty, DocumentNode value)
 {
     if (PlatformTypes.FrameworkElement.IsAssignableFrom((ITypeId)this.Type))
     {
         IType templateTargetType1 = DocumentNodeUtilities.GetStyleOrTemplateTargetType(value);
         Type  type = templateTargetType1 != null ? templateTargetType1.RuntimeType : (Type)null;
         Type  c    = this.TargetElement.ProjectContext.MetadataFactory.GetMetadata(this.Type.RuntimeType).GetStylePropertyTargetType(styleOrTemplateProperty);
         if (type == (Type)null)
         {
             return(true);
         }
         if (StyleNode.BasedOnProperty.Equals((object)styleOrTemplateProperty))
         {
             StyleNode styleNode = this.TargetElement as StyleNode;
             if (styleNode != null)
             {
                 IType templateTargetType2 = DocumentNodeUtilities.GetStyleOrTemplateTargetType(styleNode.DocumentNode);
                 c = templateTargetType2 != null ? templateTargetType2.RuntimeType : (Type)null;
             }
         }
         if (c == (Type)null && ControlStylingOperations.DoesPropertyAffectRoot((IPropertyId)this.TargetProperty))
         {
             c = this.Type.RuntimeType;
         }
         if (c != (Type)null && !type.IsAssignableFrom(c))
         {
             return(false);
         }
     }
     return(true);
 }
예제 #24
0
 static PathMetadata()
 {
     PathMetadata.DataProperty = (IPropertyId)PlatformTypes.Path.GetMember(MemberType.LocalProperty, "Data", MemberAccessTypes.Public);
     PathMetadata.GeometryTransformProperty                = (IPropertyId)PlatformTypes.Geometry.GetMember(MemberType.LocalProperty, "Transform", MemberAccessTypes.Public);
     PathMetadata.FiguresProperty                          = (IPropertyId)PlatformTypes.PathGeometry.GetMember(MemberType.LocalProperty, "Figures", MemberAccessTypes.Public);
     PathMetadata.PathFigureCollectionCountProperty        = (IPropertyId)PlatformTypes.PathFigureCollection.GetMember(MemberType.LocalProperty, "Count", MemberAccessTypes.Public);
     PathMetadata.PathGeometryFillRuleProperty             = (IPropertyId)PlatformTypes.PathGeometry.GetMember(MemberType.LocalProperty, "FillRule", MemberAccessTypes.Public);
     PathMetadata.PathGeometryFiguresProperty              = (IPropertyId)PlatformTypes.PathGeometry.GetMember(MemberType.LocalProperty, "Figures", MemberAccessTypes.Public);
     PathMetadata.PathFigureIsFilledProperty               = (IPropertyId)PlatformTypes.PathFigure.GetMember(MemberType.LocalProperty, "IsFilled", MemberAccessTypes.Public);
     PathMetadata.PathFigureStartPointProperty             = (IPropertyId)PlatformTypes.PathFigure.GetMember(MemberType.LocalProperty, "StartPoint", MemberAccessTypes.Public);
     PathMetadata.PathFigureIsClosedProperty               = (IPropertyId)PlatformTypes.PathFigure.GetMember(MemberType.LocalProperty, "IsClosed", MemberAccessTypes.Public);
     PathMetadata.PathFigureSegmentsProperty               = (IPropertyId)PlatformTypes.PathFigure.GetMember(MemberType.LocalProperty, "Segments", MemberAccessTypes.Public);
     PathMetadata.PathSegmentIsStrokedProperty             = (IPropertyId)PlatformTypes.PathSegment.GetMember(MemberType.LocalProperty, "IsStroked", MemberAccessTypes.Public);
     PathMetadata.PathSegmentIsSmoothJoinProperty          = (IPropertyId)PlatformTypes.PathSegment.GetMember(MemberType.LocalProperty, "IsSmoothJoin", MemberAccessTypes.Public);
     PathMetadata.ArcSegmentSizeProperty                   = (IPropertyId)PlatformTypes.ArcSegment.GetMember(MemberType.LocalProperty, "Size", MemberAccessTypes.Public);
     PathMetadata.ArcSegmentRotationAngleProperty          = (IPropertyId)PlatformTypes.ArcSegment.GetMember(MemberType.LocalProperty, "RotationAngle", MemberAccessTypes.Public);
     PathMetadata.ArcSegmentIsLargeArcProperty             = (IPropertyId)PlatformTypes.ArcSegment.GetMember(MemberType.LocalProperty, "IsLargeArc", MemberAccessTypes.Public);
     PathMetadata.ArcSegmentSweepDirectionProperty         = (IPropertyId)PlatformTypes.ArcSegment.GetMember(MemberType.LocalProperty, "SweepDirection", MemberAccessTypes.Public);
     PathMetadata.ArcSegmentPointProperty                  = (IPropertyId)PlatformTypes.ArcSegment.GetMember(MemberType.LocalProperty, "Point", MemberAccessTypes.Public);
     PathMetadata.LineSegmentPointProperty                 = (IPropertyId)PlatformTypes.LineSegment.GetMember(MemberType.LocalProperty, "Point", MemberAccessTypes.Public);
     PathMetadata.QuadraticBezierSegmentPoint1Property     = (IPropertyId)PlatformTypes.QuadraticBezierSegment.GetMember(MemberType.LocalProperty, "Point1", MemberAccessTypes.Public);
     PathMetadata.QuadraticBezierSegmentPoint2Property     = (IPropertyId)PlatformTypes.QuadraticBezierSegment.GetMember(MemberType.LocalProperty, "Point2", MemberAccessTypes.Public);
     PathMetadata.BezierSegmentPoint1Property              = (IPropertyId)PlatformTypes.BezierSegment.GetMember(MemberType.LocalProperty, "Point1", MemberAccessTypes.Public);
     PathMetadata.BezierSegmentPoint2Property              = (IPropertyId)PlatformTypes.BezierSegment.GetMember(MemberType.LocalProperty, "Point2", MemberAccessTypes.Public);
     PathMetadata.BezierSegmentPoint3Property              = (IPropertyId)PlatformTypes.BezierSegment.GetMember(MemberType.LocalProperty, "Point3", MemberAccessTypes.Public);
     PathMetadata.PolyLineSegmentPointsProperty            = (IPropertyId)PlatformTypes.PolyLineSegment.GetMember(MemberType.LocalProperty, "Points", MemberAccessTypes.Public);
     PathMetadata.PolyQuadraticBezierSegmentPointsProperty = (IPropertyId)PlatformTypes.PolyQuadraticBezierSegment.GetMember(MemberType.LocalProperty, "Points", MemberAccessTypes.Public);
     PathMetadata.PolyBezierSegmentPointsProperty          = (IPropertyId)PlatformTypes.PolyBezierSegment.GetMember(MemberType.LocalProperty, "Points", MemberAccessTypes.Public);
     PathMetadata.ClipProperty = (IPropertyId)PlatformTypes.UIElement.GetMember(MemberType.LocalProperty, "Clip", MemberAccessTypes.Public);
 }
예제 #25
0
 public TriggerCondition(SceneNode conditionNode, IPropertyId propertyKey, IPropertyId valueKey, IPropertyId sourceNameKey)
 {
     this.conditionNode = conditionNode;
     this.propertyKey   = propertyKey;
     this.valueKey      = valueKey;
     this.sourceNameKey = sourceNameKey;
 }
예제 #26
0
 public static bool DoesPropertyAffectRoot(IPropertyId propertyKey)
 {
     if (!BaseFrameworkElement.StyleProperty.Equals((object)propertyKey) && !ControlElement.TemplateProperty.Equals((object)propertyKey))
     {
         return(PageElement.TemplateProperty.Equals((object)propertyKey));
     }
     return(true);
 }
예제 #27
0
 public override ISceneNodeCollection <SceneNode> GetCollectionForProperty(IPropertyId childProperty)
 {
     if (this.TextChildProperty.Equals((object)childProperty))
     {
         return(this.TextFlowCollectionForTextChildProperty);
     }
     return(base.GetCollectionForProperty(childProperty));
 }
예제 #28
0
 public bool CanCreateAndSetBindingOrData(SceneNode target, IPropertyId targetProperty, DataSchemaNodePath bindingPath, bool useSourceInherited)
 {
     if (targetProperty == null)
     {
         return(this.CanCreateAndSetBindingOrData(target, bindingPath, useSourceInherited));
     }
     return(this.CanCreateAndSetBindingOrDataInternal(target, targetProperty, bindingPath, useSourceInherited));
 }
예제 #29
0
 private T GetValue <T>(IPropertyId property, T defaultValue)
 {
     if (this.ViewModel.DocumentRoot != null && this.IsSet(property) == PropertyState.Set)
     {
         return((T)this.GetLocalValue(property));
     }
     return(defaultValue);
 }
예제 #30
0
 private bool ShouldUseDesignTimeUri(IPropertyId parentProperty)
 {
     if (KnownProperties.FrameSourceProperty.Equals(parentProperty))
     {
         return(false);
     }
     return(!DesignTimeProperties.RuntimeFontUriProperty.Equals(parentProperty));
 }