Beispiel #1
0
        public LegendItemViewModel Clone()
        {
            LegendItemViewModel newItem = new LegendItemViewModel
            {
                NotifiedGeoFont        = NotifiedGeoFont.Clone(),
                BackgroundMask         = BackgroundMask == null ? null : (AreaStyle)BackgroundMask.CloneDeep(),
                BottomPadding          = BottomPadding,
                Height                 = Height,
                ImageBottomPadding     = ImageBottomPadding,
                ImageHeight            = ImageHeight,
                ImageJustificationMode = ImageJustificationMode,
                ImageLeftPadding       = ImageLeftPadding,
                ImageMask              = ImageMask == null ? null : (AreaStyle)ImageMask.CloneDeep(),
                ImageRightPadding      = ImageRightPadding,
                //ImageStyle = ImageStyle.CloneDeep(),
                ImageTopPadding   = ImageTopPadding,
                ImageWidth        = ImageWidth,
                LeftPadding       = LeftPadding,
                LegendItemType    = LegendItemType,
                TextBottomPadding = TextBottomPadding,
                TextLeftPadding   = TextLeftPadding,
                TextMask          = TextMask == null ? null : (AreaStyle)TextMask.CloneDeep(),
                TextRightPadding  = TextRightPadding,
                TextSolidBrush    = TextSolidBrush,
                TextTopPadding    = TextTopPadding,
                Text       = this.Text,
                TopPadding = TopPadding,
                Width      = Width,
                Parent     = Parent
            };

            if (ImageStyle != null)
            {
                newItem.ImageStyle = ImageStyle.CloneDeep();
            }

            return(newItem);
        }