Esempio n. 1
0
        static PropertyFilter()
        {
            ExcludeFilter = new PropertyFilter();
            ExcludeFilter.unaryOperator = UnaryOperator.NotOperator;
            AddExcludeProperties();

            LayoutFilter = new PropertyFilter(
                new RadProperty[] {
                RadElement.AngleTransformProperty,
                RadElement.BorderThicknessProperty,
                RadElement.MarginProperty,
                RadElement.MaxSizeProperty,
                RadElement.MinSizeProperty,
                RadElement.PaddingProperty,
                RadElement.PositionOffsetProperty,
                RadElement.ScaleTransformProperty,
                RadElement.StretchHorizontallyProperty,
                RadElement.StretchVerticallyProperty
            });

            AppearanceFilter = new PropertyFilter(
                new RadProperty[] {
                RadElement.ShapeProperty,
                VisualElement.BackColorProperty,
                VisualElement.ForeColorProperty,
                VisualElement.FontProperty,
                VisualElement.TextRenderingHintProperty,
                VisualElement.SmoothingModeProperty,
                VisualElement.OpacityProperty
            });

            BehaviorFilter = new PropertyFilter(
                new RadProperty[] {
                RadElement.ShouldPaintProperty,
                RadElement.ZIndexProperty,
                RadElement.VisibilityProperty
            });

            FillPrimitiveFilter = new PropertyFilter(GetPropertiesDeclaredByType(typeof(FillPrimitive)));
            FillPrimitiveFilter.availableProperties.Add(RadElement.MarginProperty.NameHash, RadElement.MarginProperty);

            BorderPrimitiveFilter = new PropertyFilter(GetPropertiesDeclaredByType(typeof(BorderPrimitive)));
            BorderPrimitiveFilter.availableProperties.Add(RadElement.BorderThicknessProperty.NameHash, RadElement.BorderThicknessProperty);
            BorderPrimitiveFilter.availableProperties.Add(RadElement.MarginProperty.NameHash, RadElement.MarginProperty);

            ImagePrimitiveFilter = new PropertyFilter(GetPropertiesDeclaredByType(typeof(ImagePrimitive)));
            ImagePrimitiveFilter.availableProperties.Add(RadElement.MarginProperty.NameHash, RadElement.MarginProperty);
            ImagePrimitiveFilter.availableProperties.Add(RadElement.ShouldPaintProperty.NameHash, RadElement.ShouldPaintProperty);

            TextPrimitiveFilter = new PropertyFilter(GetPropertiesDeclaredByType(typeof(TextPrimitive)));
            TextPrimitiveFilter.availableProperties.Add(RadElement.MarginProperty.NameHash, RadElement.MarginProperty);
            TextPrimitiveFilter.availableProperties.Add(RadElement.ShouldPaintProperty.NameHash, RadElement.ShouldPaintProperty);
            TextPrimitiveFilter.availableProperties.Add(VisualElement.ForeColorProperty.NameHash, VisualElement.ForeColorProperty);
            TextPrimitiveFilter.availableProperties.Remove(TextPrimitive.TextProperty.NameHash);
        }
Esempio n. 2
0
 public static void AddPropertiesDeclaredByType(
     Dictionary <int, RadProperty> properties,
     Type type)
 {
     foreach (RadProperty radProperty in PropertyFilter.GetPropertiesDeclaredByType(type))
     {
         if (!properties.ContainsKey(radProperty.NameHash))
         {
             properties.Add(radProperty.NameHash, radProperty);
         }
     }
 }