Ejemplo n.º 1
0
        public String_Properties GetInherittedPropertiesMerging(String_Properties inherittedSource)
        {
            String_Properties result = Clone();

            if (result.InheritFontSize)
            {
                result.FontSize        = inherittedSource.FontSize;
                result.InheritFontSize = inherittedSource.InheritFontSize;
            }
            if (result.InheritFontFamily)
            {
                result.FontFamily        = inherittedSource.FontFamily;
                result.InheritFontFamily = inherittedSource.InheritFontFamily;
            }
            if (result.InheritFontStyle)
            {
                result.SFontStyle       = inherittedSource.SFontStyle;
                result.InheritFontStyle = inherittedSource.InheritFontStyle;
            }
            if (result.InheritFontWeight)
            {
                result.SFontWeight       = inherittedSource.SFontWeight;
                result.InheritFontWeight = inherittedSource.InheritFontWeight;
            }
            if (result.InheritFontBrush)
            {
                result.GradientTextBrush   = inherittedSource.GradientTextBrush.Clone();
                result.SolidColorTextBrush = inherittedSource.SolidColorTextBrush.Clone();
                result.TextBrushColorMode  = inherittedSource.TextBrushColorMode;
                result.InheritFontBrush    = inherittedSource.InheritFontBrush;
            }

            return(result);
        }
Ejemplo n.º 2
0
        public String_Properties Clone()
        {
            String_Properties result = (String_Properties)MemberwiseClone();

            result.FontFamily          = (string)FontFamily.Clone();
            result.GradientTextBrush   = GradientTextBrush.Clone();
            result.SolidColorTextBrush = SolidColorTextBrush.Clone();

            return(result);
        }