CsConsoleFormat v1.0.0 Release Notes

Release Date: 2018-03-15 // about 6 years ago
  • ๐Ÿ†• New features

    • โž• Added new syntax for child elements using constructors: new Element(new Child(), "text") (closer resembles LINQ to XML; Children property should still be used in complex multi-line cases with other properties).
    • โž• Added new syntax for attached properties: new Element { Values = { Foo.Bar == 1 } }.
    • โž• Added new syntax in fluent mode (requires using Alba.CsConsoleFormat.Fluent):
      • Properties with unique enums: new Element { Values = { DockTo.Left } }.
      • Color and Background properties: new Element { Values = { White } } and new Element { Values = { White.On(Black) } }.
      • GridLength extension methods for integers: 1.Star() and 2.Char().
      • ConsoleTest project now includes new sample usage of all fluent syntax.

    ๐Ÿ”„ Changes

    • API changes:
      • Renamed Canvas element to Absolute (closer resembles CSS concepts; also less confusing for Delphi users with their TCanvas, if any still exist).
      • Renamed Render method to RenderOverride (consistency and enforcing bypass if Visibility is Collapsed).
      • Changed ValuesInitializer collection initializer to be extensible through extension methods in separate assemblies.
    • โž• Added EditorBrowsableState.Advanced to converters, Value-related classes and classes with extension methods.

    ๐Ÿ›  Fixes

    • ๐Ÿ›  Fixed various rare rendering issues (see #19):
      • Negative margins.
      • Clipping non-left-aligned elements with MaxWidth/MaxHeight.
      • Uncontrollable growth of document if Document.VerticalAlign is changed to Stretch.

Previous changes from v0.10.0

  • Warning: Major breaking changes in API.

    ๐Ÿ†• New features

    • โž• Added Children and Columns collection initializers with behavior of LINQ to XML constructors. AddChildren and AddColumns extension methods marked as obsolete.
    • โž• Added Element.Values object initializer dummy for setting attached properties. Can be used instead of Element's indexer if strong typing is preffered.
    • #15 (Extension methods to color strings like in npm.colors for JS). For example: "Text".Red().OnDarkBlue(). Requires using Alba.CsConsoleFormat.Fluent.
    • #16 (Extend line characters): Switched to 4-direction line chars. More precise control of drawing lines. Now adjacent tables are drawn correctly.
    • โž• Added support for LineWidth.Heavy in LineCharRenderer.BoxExtended. Requires the console to use a font which supports the relevant Unicode box drawing characters. Not as wide-spread as DOS box drawing characters, so opt-in.
    • โž• Added Docuemnt.LineCharRenderer property (previously line char renderer could only be set through ConsoleBuffer which isn't normally exposed).

    ๐Ÿ”„ Changes

    • ๐Ÿ“‡ Renamed many properties to follow CSS naming instead of older WPF/HTML mix: HorizontalAlignment Align to Align Align, VerticalAlignment VAlign to VerticalAlign VerticalAlign, TextAlignment TextAlign to TextAlign TextAlign, TextWrapping TextWrap to TextWrap TextWrap, GridUnitType UnitType to GridUnit Unit.
    • Constructors of Thickness and LineThickness use CSS argument order for 2 argument overloads.
    • ๐Ÿ“‡ Renamed LineChar.Wide to Double.

    ๐Ÿ›  Fixes

    • #13 (TextAlign property doesn't work on single-line blocks)