Skip to content

Getting Started

Sven Erik Vinkemeier edited this page Apr 28, 2018 · 2 revisions

To use Xamzor components in your Blazor app:

  1. Add a reference to the Xamzor NuGet package

  2. Add the following to your _ViewImports.cshtml:

@using Xamzor.UI
@using Xamzor.UI.Components
@using static Xamzor.UI.Helpers
@addTagHelper *, Xamzor

Other important things:

  • Due to Blazor limitations you MUST include Parent="PARENT" in ALL Xamzor component tags you write, e.g. <Border Parent="PARENT" Background="blue" ... />. This is a workaround which hopefully can be eliminated in the future.
  • Non-string properties cannot be assigned string values, e.g. <Grid Margin="8,4" /> does NOT work because Margin is of type Thickness and 8,4 is not a valid C# expression returning a Thickness. Instead, use the constants and helper methods from class Helpers, e.g. <Grid Margin="T(8,4)" RowDefinitions="Rows("Auto", "*")" ... />
Clone this wiki locally