/// <summary> /// Returns a corresponding <see cref="HorizontalAlignment"/> to the given <paramref name="orientation"/>. /// </summary> /// <param name="orientation">Orientation to map</param> /// <returns>Corresponding <see cref="HorizontalAlignment"/></returns> private HorizontalAlignment MapTextAlign(EColumnTextOrientation orientation) { if (orientation == EColumnTextOrientation.Left) { return(HorizontalAlignment.Left); } if (orientation == EColumnTextOrientation.Right) { return(HorizontalAlignment.Right); } return(HorizontalAlignment.Center); }
/// <summary> /// Creates a new instance with the given <paramref name="headerText"/>, /// <paramref name="defaultWidth"/> and <paramref name="orientation"/>. /// </summary> /// <param name="headerText">Header text</param> /// <param name="defaultWidth">Default width</param> /// <param name="orientation">Orientation</param> public ColumnDescriptor(string headerText, uint defaultWidth, EColumnTextOrientation orientation) { HeaderText = headerText ?? string.Empty; DefaultWidth = defaultWidth; Orientation = orientation; }