A simple Avalonia UI project for managing and visualizing array-based data structures.
ArrayBoard is a small C# / Avalonia desktop application that demonstrates working with arrays, data binding, and MVVM in a clean and modular structure.
The project was originally designed for a university task — "WPF program with arrays" — and implemented using Avalonia for cross-platform compatibility (macOS & Windows).
- Display, add, edit, and remove items in an array of objects (
Carmodel). - Real-time search and filtering by selected column.
- Confirmation dialog for deletions.
- Separation into layers (
Models,ViewModels,Views,Services). - Unit tests with logging for basic operations.
- Three deliberate runtime bugs for teamwork debugging practice.
ArrayBoard/
├── apps/
│ └── ArrayBoard.App/
│ ├── Models/ # Core data structures
│ ├── ViewModels/ # Business logic and binding
│ ├── Views/ # Avalonia XAML UI
│ ├── Services/ # Dialog handling
│ └── Resources/ # Localization and styles
├── tests/
│ └── ArrayBoard.Tests/ # Unit tests (with bug tracing)
- C# 12 / .NET 9
- Avalonia UI 11
- MVVM pattern
- xUnit for testing
Bug #1 – Culture-Sensitive Price Parsing
- Symptom: Entering price with a comma in some locales (e.g., "12,50") throws FormatException.
- Repro:
- Add or edit a car.
- In "Price" field, type value with a comma (e.g., "19999,99").
- Click "OK" -> app crashes or shows unhandled error.
- Suspected Place: CarEditViewModel.cs, price parsing logic.
Bug #2 – Delete While Filtered
- Symptom: If you apply a filter, delete an item, then clear the filter, sometimes an ArgumentOutOfRangeException occurs or the grid index gets out of sync.
- Repro:
- Set filter to match a subset (e.g., Brand: "Ford").
- Delete the only visible row.
- Clear filter -> random crash or inconsistent selection.
- Suspected Place: MainViewModel.cs, remove logic vs. collection view sync.
Bug #3 – Cancel Still Saves
- Symptom: In the Edit dialog, clicking "Cancel" still commits some changes because the binding updates the model prematurely.
- Repro:
- Select a row, click "Edit".
- Change fields; click "Cancel".
- Observe that changes are sometimes reflected in the grid.
- Suspected Place: CarEditDialog.axaml.cs and CarEditViewModel.cs (two-way binding updates original object, no snapshot/rollback).
dotnet restore
dotnet build
dotnet run --project apps/ArrayBoard.Appdotnet test