コード例 #1
0
 public static IndexedClrPropertyReferenceStep GetReferenceStep(ITypeResolver typeResolver, Type declaringType, int index)
 {
     return(IndexedClrPropertyReferenceStep.GetReferenceStep(typeResolver, declaringType, index, true));
 }
コード例 #2
0
 public static IndexedClrPropertyReferenceStep GetReferenceStep(IPlatformMetadata platformMetadata, ITypeId declaringTypeId, int index)
 {
     return(IndexedClrPropertyReferenceStep.GetReferenceStep(((PlatformTypes)platformMetadata).DefaultTypeResolver, declaringTypeId, index));
 }
コード例 #3
0
        public static IndexedClrPropertyReferenceStep GetReferenceStep(ITypeResolver typeResolver, ITypeId declaringTypeId, int index)
        {
            IType type = typeResolver.ResolveType(declaringTypeId);

            return(IndexedClrPropertyReferenceStep.GetReferenceStep(typeResolver, type.RuntimeType, index, true));
        }
コード例 #4
0
 private void EnsurePropertyReferences()
 {
     if (!this.initialized)
     {
         this.initialized = true;
         if (!this.PlatformMetadata.IsCapabilitySet(PlatformCapability.SupportsCompositeTransform))
         {
             PropertyReference propertyReference  = new PropertyReference((ReferenceStep)this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.TransformGroup.GetMember(MemberType.Property, "Children", MemberAccessTypes.Public)));
             PropertyReference propertyReference1 = propertyReference.Append(IndexedClrPropertyReferenceStep.GetReferenceStep(this.PlatformMetadata, PlatformTypes.TransformCollection, CanonicalTransformOrder.ScaleIndex));
             PropertyReference propertyReference2 = propertyReference.Append(IndexedClrPropertyReferenceStep.GetReferenceStep(this.PlatformMetadata, PlatformTypes.TransformCollection, CanonicalTransformOrder.SkewIndex));
             PropertyReference propertyReference3 = propertyReference.Append(IndexedClrPropertyReferenceStep.GetReferenceStep(this.PlatformMetadata, PlatformTypes.TransformCollection, CanonicalTransformOrder.RotateIndex));
             PropertyReference propertyReference4 = propertyReference.Append(IndexedClrPropertyReferenceStep.GetReferenceStep(this.PlatformMetadata, PlatformTypes.TransformCollection, CanonicalTransformOrder.TranslateIndex));
             this.scaleX          = propertyReference1.Append((ReferenceStep)this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.ScaleTransform.GetMember(MemberType.Property, "ScaleX", MemberAccessTypes.Public)));
             this.scaleY          = propertyReference1.Append((ReferenceStep)this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.ScaleTransform.GetMember(MemberType.Property, "ScaleY", MemberAccessTypes.Public)));
             this.scaleCenterX    = propertyReference1.Append((ReferenceStep)this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.ScaleTransform.GetMember(MemberType.Property, "CenterX", MemberAccessTypes.Public)));
             this.scaleCenterY    = propertyReference1.Append((ReferenceStep)this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.ScaleTransform.GetMember(MemberType.Property, "CenterY", MemberAccessTypes.Public)));
             this.skewX           = propertyReference2.Append((ReferenceStep)this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.SkewTransform.GetMember(MemberType.Property, "AngleX", MemberAccessTypes.Public)));
             this.skewY           = propertyReference2.Append((ReferenceStep)this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.SkewTransform.GetMember(MemberType.Property, "AngleY", MemberAccessTypes.Public)));
             this.skewCenterX     = propertyReference2.Append((ReferenceStep)this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.SkewTransform.GetMember(MemberType.Property, "CenterX", MemberAccessTypes.Public)));
             this.skewCenterY     = propertyReference2.Append((ReferenceStep)this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.SkewTransform.GetMember(MemberType.Property, "CenterY", MemberAccessTypes.Public)));
             this.rotationAngle   = propertyReference3.Append((ReferenceStep)this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.RotateTransform.GetMember(MemberType.Property, "Angle", MemberAccessTypes.Public)));
             this.rotationCenterX = propertyReference3.Append((ReferenceStep)this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.RotateTransform.GetMember(MemberType.Property, "CenterX", MemberAccessTypes.Public)));
             this.rotationCenterY = propertyReference3.Append((ReferenceStep)this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.RotateTransform.GetMember(MemberType.Property, "CenterY", MemberAccessTypes.Public)));
             this.translationX    = propertyReference4.Append((ReferenceStep)this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.TranslateTransform.GetMember(MemberType.Property, "X", MemberAccessTypes.Public)));
             this.translationY    = propertyReference4.Append((ReferenceStep)this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.TranslateTransform.GetMember(MemberType.Property, "Y", MemberAccessTypes.Public)));
         }
         else
         {
             PropertyReference propertyReference5 = new PropertyReference((ReferenceStep)this.PlatformMetadata.ResolveProperty(KnownProperties.CenterXProperty));
             PropertyReference propertyReference6 = new PropertyReference((ReferenceStep)this.PlatformMetadata.ResolveProperty(KnownProperties.CenterYProperty));
             this.scaleX          = new PropertyReference((ReferenceStep)this.PlatformMetadata.ResolveProperty(KnownProperties.ScaleXProperty));
             this.scaleY          = new PropertyReference((ReferenceStep)this.PlatformMetadata.ResolveProperty(KnownProperties.ScaleYProperty));
             this.scaleCenterX    = propertyReference5;
             this.scaleCenterY    = propertyReference6;
             this.skewX           = new PropertyReference((ReferenceStep)this.PlatformMetadata.ResolveProperty(KnownProperties.SkewXProperty));
             this.skewY           = new PropertyReference((ReferenceStep)this.PlatformMetadata.ResolveProperty(KnownProperties.SkewYProperty));
             this.skewCenterX     = propertyReference5;
             this.skewCenterY     = propertyReference6;
             this.rotationAngle   = new PropertyReference((ReferenceStep)this.PlatformMetadata.ResolveProperty(KnownProperties.RotationProperty));
             this.rotationCenterX = propertyReference5;
             this.rotationCenterY = propertyReference6;
             this.translationX    = new PropertyReference((ReferenceStep)this.PlatformMetadata.ResolveProperty(KnownProperties.TranslateXProperty));
             this.translationY    = new PropertyReference((ReferenceStep)this.PlatformMetadata.ResolveProperty(KnownProperties.TranslateYProperty));
         }
         this.renderTransform              = new PropertyReference(this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.FrameworkElement.GetMember(MemberType.Property, "RenderTransform", MemberAccessTypes.Public)) as ReferenceStep);
         this.renderTransformScaleX        = this.RenderTransform.Append(this.ScaleX);
         this.renderTransformScaleY        = this.RenderTransform.Append(this.ScaleY);
         this.renderTransformSkewX         = this.RenderTransform.Append(this.SkewX);
         this.renderTransformSkewY         = this.RenderTransform.Append(this.SkewY);
         this.renderTransformRotationAngle = this.RenderTransform.Append(this.rotationAngle);
         this.renderTransformTranslationX  = this.RenderTransform.Append(this.translationX);
         this.renderTransformTranslationY  = this.RenderTransform.Append(this.translationY);
         if (!this.PlatformMetadata.IsNullType(this.PlatformMetadata.ResolveType(PlatformTypes.Transform3DGroup)))
         {
             PropertyReference propertyReference7 = new PropertyReference((ReferenceStep)this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.Transform3DGroup.GetMember(MemberType.Property, "Children", MemberAccessTypes.Public)));
             this.scaleTransform3DReference          = propertyReference7.Append(IndexedClrPropertyReferenceStep.GetReferenceStep(this.PlatformMetadata, PlatformTypes.Transform3DCollection, 1));
             this.rotateTransform3DReference         = propertyReference7.Append(IndexedClrPropertyReferenceStep.GetReferenceStep(this.PlatformMetadata, PlatformTypes.Transform3DCollection, 2));
             this.translateTransform3DReference      = propertyReference7.Append(IndexedClrPropertyReferenceStep.GetReferenceStep(this.PlatformMetadata, PlatformTypes.Transform3DCollection, 4));
             this.rotateTransform3DRotationReference = this.rotateTransform3DReference.Append((ReferenceStep)this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.RotateTransform3D.GetMember(MemberType.Property, "Rotation", MemberAccessTypes.Public)));
         }
         this.brushRelativeTransformReference = new PropertyReference((ReferenceStep)this.PlatformMetadata.ResolveProperty((IPropertyId)PlatformTypes.Brush.GetMember(MemberType.Property, "RelativeTransform", MemberAccessTypes.Public)));
         this.brushScaleXReference            = this.BrushRelativeTransformReference.Append(this.ScaleX);
         this.brushScaleYReference            = this.BrushRelativeTransformReference.Append(this.ScaleY);
         this.brushScaleCenterXReference      = this.BrushRelativeTransformReference.Append(this.ScaleCenterX);
         this.brushScaleCenterYReference      = this.BrushRelativeTransformReference.Append(this.ScaleCenterY);
         this.brushSkewXReference             = this.BrushRelativeTransformReference.Append(this.SkewX);
         this.brushSkewYReference             = this.BrushRelativeTransformReference.Append(this.SkewY);
         this.brushSkewCenterXReference       = this.BrushRelativeTransformReference.Append(this.SkewCenterX);
         this.brushSkewCenterYReference       = this.BrushRelativeTransformReference.Append(this.SkewCenterY);
         this.brushRotationAngleReference     = this.BrushRelativeTransformReference.Append(this.RotationAngle);
         this.brushRotationCenterXReference   = this.BrushRelativeTransformReference.Append(this.RotationCenterX);
         this.brushRotationCenterYReference   = this.BrushRelativeTransformReference.Append(this.RotationCenterY);
         this.brushTranslationXReference      = this.BrushRelativeTransformReference.Append(this.TranslationX);
         this.brushTranslationYReference      = this.BrushRelativeTransformReference.Append(this.TranslationY);
     }
 }