NClass.DiagramEditor.Style.Clone C# (CSharp) Method

Clone() public method

public Clone ( ) : Style
return Style
		public Style Clone()
		{
			Style newStyle = (Style) this.MemberwiseClone();

			newStyle.nameFont = (Font) NameFont.Clone();
			newStyle.abstractNameFont = (Font) AbstractNameFont.Clone();
			newStyle.identifierFont = (Font) IdentifierFont.Clone();
			newStyle.memberFont = (Font) MemberFont.Clone();
			newStyle.staticMemberFont = (Font) StaticMemberFont.Clone();
			newStyle.abstractMemberFont = (Font) AbstractMemberFont.Clone();
			newStyle.commentFont = (Font) CommentFont.Clone();
			newStyle.relationshipTextFont = (Font) RelationshipTextFont.Clone();

			return newStyle;
		}

Usage Example

Example #1
0
		private static Style MakeShadowsOpaque(Style selectedStyle)
		{
			Style converted = selectedStyle.Clone();
			converted.ShadowColor = DisableTransparency(converted.ShadowColor);
			return converted;
		}