Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/maui/markup/extensions/bindable-object-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ new Entry().Bind(nameof(ViewModel.RegistrationCode))
> [!WARNING]
> This approach will result in some level of Reflection being used and will not perform as well as the [Explicit property](#inline-conversion) approach.

> [!Warning]
> Bindings like this that use a `string` for the `path:` parameter are not trim-safe

#### Value conversion

The `Bind` method allows for a developer to supply the `Converter` that they wish to use in the binding or simply provide a mechanism to use an inline conversion.
Expand Down Expand Up @@ -123,8 +126,8 @@ The `convert` parameter is a `Func` that is required to convert the multiple bin
```csharp
new Label()
.Bind(Label.TextProperty,
binding1: new Binding(nameof(ViewModel.IsBusy)),
binding2: new Binding(nameof(ViewModel.LabelText)),
binding1: BindingBase.Create((ViewModel vm) => vm.IsBusy),
binding2: BindingBase.Create((ViewModel vm) => vm.LabelText),
convert: ((bool IsBusy, string LabelText) values) => values.IsBusy ? string.Empty : values.LabelText)
```

Expand Down
10 changes: 10 additions & 0 deletions docs/maui/markup/extensions/text-alignment-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ Here's an example setting `Label.HorizontalTextAlignment` to `TextAlignment.End`
new Label().TextEnd()
```

## TextJustify

The `TextJustify` method sets the `ITextAlignment.HorizontalTextAlignment` property to `TextAlignment.Justify`.

Here's an example setting `Label.HorizontalTextAlignment` to `TextAlignment.Justify` using `TextJustify`:

```cs
new Label().TextJustify()
```

## TextTop

The `TextTop` method sets the `ITextAlignment.VerticalTextAlignment` property to `TextAlignment.Start`.
Expand Down