-
Notifications
You must be signed in to change notification settings - Fork 3
Getting Started
Sven Erik Vinkemeier edited this page Apr 28, 2018
·
2 revisions
To use Xamzor components in your Blazor app:
-
Add a reference to the Xamzor NuGet package
-
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 becauseMargin
is of typeThickness
and8,4
is not a valid C# expression returning aThickness
. Instead, use the constants and helper methods from classHelpers
, e.g.<Grid Margin="T(8,4)" RowDefinitions="Rows("Auto", "*")" ... />