development-plugin-for-avalonia

Forms, Decision-Heavy UX, and Data-Dense Surfaces in Avalonia

Table of Contents

  1. Scope and Primary APIs
  2. Form Design Rules
  3. Data-Dense Surface Rules
  4. Validation and Recovery Patterns
  5. AOT and Runtime Notes
  6. Do and Don’t Guidance
  7. Troubleshooting
  8. Official Resources

Scope and Primary APIs

Use this reference to design operational UI where correctness matters more than decoration.

Primary APIs:

This file covers:

Form Design Rules

Forms should optimize for completion accuracy:

<StackPanel xmlns="https://github.com/avaloniaui"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            Spacing="12">
  <TextBlock Classes="section-title" Text="Schedule rollout" />

  <TextBox Watermark="Release name"
           Text="{CompiledBinding ReleaseName}" />

  <CalendarDatePicker SelectedDate="{CompiledBinding StartDate}" />

  <NumericUpDown Value="{CompiledBinding MaxParallelNodes}"
                 Minimum="1"
                 Maximum="20" />

  <AutoCompleteBox Text="{CompiledBinding Owner}"
                   MinimumPrefixLength="2"
                   Watermark="Owner" />
</StackPanel>

Data-Dense Surface Rules

Dense UI needs stronger structure, not more styling noise.

Rules:

<Grid xmlns="https://github.com/avaloniaui"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      ColumnDefinitions="Auto,*,Auto"
      RowDefinitions="Auto,Auto,*"
      RowSpacing="12"
      ColumnSpacing="12">
  <TextBlock Grid.ColumnSpan="3"
             Classes="title"
             Text="Environment health" />

  <ComboBox Grid.Row="1"
            Width="220"
            SelectedItem="{CompiledBinding SeverityFilter}" />

  <TextBox Grid.Row="1"
           Grid.Column="1"
           Watermark="Search incidents"
           Text="{CompiledBinding SearchText}" />

  <Button Grid.Row="1"
          Grid.Column="2"
          Content="Refresh" />

  <ListBox Grid.Row="2"
           Grid.ColumnSpan="3"
           ItemContainerTheme="{StaticResource DenseListItemTheme}" />
</Grid>

Validation and Recovery Patterns

<DataValidationErrors xmlns="https://github.com/avaloniaui"
                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <TextBox Text="{CompiledBinding ReleaseName}" />
</DataValidationErrors>

Guidance:

AOT and Runtime Notes

Do and Don’t Guidance

Do:

Do not:

Troubleshooting

  1. The form looks clean but completion errors are high.
    • Add visible labels, helper text at ambiguity points, and clearer validation.
  2. Dense screens feel chaotic.
    • Reduce accent use, normalize alignment, and strengthen section grouping.
  3. Recovery feels frustrating.
    • Rewrite validation and status content around the next corrective action.

Official Resources