protected override void InitializeShapeFields(IList<ShapeField> shapeFields) { base.InitializeShapeFields(shapeFields); // Find the Comments decorator and make it wrapped TextField commentField = FindShapeField(shapeFields, FIELDNAME_DESCRIPTION) as TextField; shapeFields.Remove(commentField); // Replace with wrapped text field UI.Decorators.WrappedTextField wrappedCommentField = new UI.Decorators.WrappedTextField(commentField); shapeFields.Add(wrappedCommentField); }
public class WrappedTextField: TextField { public WrappedTextField(TextField prototype) : base(prototype.Name ) { // Copy the starting properties form the prototype DefaultText = prototype.DefaultText; DefaultFocusable = prototype.DefaultFocusable; DefaultAutoSize = false; DefaultMultipleLine = true; AnchoringBehavior.Clear(); AnchoringBehavior.CenterHorizontally( ); AnchoringBehavior.CenterVertically( ); DefaultAccessibleState = prototype.DefaultAccessibleState; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)