private static ReferenceStep GetCorrespondingCompositeProperty(PropertyReference propertyReference) { if (propertyReference == null) { return((ReferenceStep)null); } IPropertyId propertyId = (IPropertyId)propertyReference.LastStep; IMetadataResolver metadataResolver = (IMetadataResolver)propertyReference.PlatformMetadata; if (propertyId.Equals((object)RotateTransformNode.AngleProperty)) { return((ReferenceStep)metadataResolver.ResolveProperty(CompositeTransformNode.RotationProperty)); } if (propertyId.Equals((object)ScaleTransformNode.ScaleXProperty)) { return((ReferenceStep)metadataResolver.ResolveProperty(CompositeTransformNode.ScaleXProperty)); } if (propertyId.Equals((object)ScaleTransformNode.ScaleYProperty)) { return((ReferenceStep)metadataResolver.ResolveProperty(CompositeTransformNode.ScaleYProperty)); } if (propertyId.Equals((object)SkewTransformNode.AngleXProperty)) { return((ReferenceStep)metadataResolver.ResolveProperty(CompositeTransformNode.SkewXProperty)); } if (propertyId.Equals((object)SkewTransformNode.AngleYProperty)) { return((ReferenceStep)metadataResolver.ResolveProperty(CompositeTransformNode.SkewYProperty)); } if (propertyId.Equals((object)TranslateTransformNode.XProperty)) { return((ReferenceStep)metadataResolver.ResolveProperty(CompositeTransformNode.TranslateXProperty)); } if (propertyId.Equals((object)TranslateTransformNode.YProperty)) { return((ReferenceStep)metadataResolver.ResolveProperty(CompositeTransformNode.TranslateYProperty)); } if (RotateTransformNode.CenterXProperty.Equals((object)propertyId) || SkewTransformNode.CenterXProperty.Equals((object)propertyId) || ScaleTransformNode.CenterXProperty.Equals((object)propertyId)) { return((ReferenceStep)metadataResolver.ResolveProperty(CompositeTransformNode.CenterXProperty)); } if (RotateTransformNode.CenterYProperty.Equals((object)propertyId) || SkewTransformNode.CenterYProperty.Equals((object)propertyId) || ScaleTransformNode.CenterYProperty.Equals((object)propertyId)) { return((ReferenceStep)metadataResolver.ResolveProperty(CompositeTransformNode.CenterYProperty)); } return((ReferenceStep)null); }
public XamlNameResolverImpl(object target, IMetadataResolver metadataResolver) { if (InstanceBuilderOperations.InstanceBuilderServiceProvider.XamlNameResolverImpl.DesignTimeNameScopeProperty == null) { DependencyPropertyReferenceStep dependencyPropertyReferenceStep = metadataResolver.ResolveProperty(DesignTimeProperties.DesignTimeNameScopeProperty) as DependencyPropertyReferenceStep; if (dependencyPropertyReferenceStep != null) { InstanceBuilderOperations.InstanceBuilderServiceProvider.XamlNameResolverImpl.DesignTimeNameScopeProperty = (DependencyProperty)dependencyPropertyReferenceStep.DependencyProperty; } } this.target = target; this.FindNameScope(); UIThreadDispatcherHelper.BeginInvoke(DispatcherPriority.Send, new DispatcherOperationCallback((object o) => { this.isInitialized = true; this.FindNameScope(); if (this.OnNameScopeInitializationComplete != null) { this.OnNameScopeInitializationComplete(this, EventArgs.Empty); } return(null); }), null); }