Releases: Athari/CsConsoleFormat
Releases · Athari/CsConsoleFormat
v1.0.0
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 } }
andnew Element { Values = { White.On(Black) } }
. GridLength
extension methods for integers:1.Star()
and2.Char()
.- ConsoleTest project now includes new sample usage of all fluent syntax.
- Properties with unique enums:
Changes
- API changes:
- Renamed
Canvas
element toAbsolute
(closer resembles CSS concepts; also less confusing for Delphi users with theirTCanvas
, if any still exist). - Renamed
Render
method toRenderOverride
(consistency and enforcing bypass ifVisibility
isCollapsed
). - Changed
ValuesInitializer
collection initializer to be extensible through extension methods in separate assemblies.
- Renamed
- 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 toStretch
.
v0.10.0
Warning: Major breaking changes in API.
New features
- Added
Children
andColumns
collection initializers with behavior of LINQ to XML constructors.AddChildren
andAddColumns
extension methods marked as obsolete. - Added
Element.Values
object initializer dummy for setting attached properties. Can be used instead ofElement
's indexer if strong typing is preffered. - #15 (Extension methods to color strings like in npm.colors for JS). For example:
"Text".Red().OnDarkBlue()
. Requiresusing 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
inLineCharRenderer.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 throughConsoleBuffer
which isn't normally exposed).
Changes
- Renamed many properties to follow CSS naming instead of older WPF/HTML mix:
HorizontalAlignment Align
toAlign Align
,VerticalAlignment VAlign
toVerticalAlign VerticalAlign
,TextAlignment TextAlign
toTextAlign TextAlign
,TextWrapping TextWrap
toTextWrap TextWrap
,GridUnitType UnitType
toGridUnit Unit
. - Constructors of
Thickness
andLineThickness
use CSS argument order for 2 argument overloads. - Renamed
LineChar.Wide
toDouble
.
Fixes
- #13 (TextAlign property doesn't work on single-line blocks)