Add converters
ADD
WalletWasabi.Fluent/Converters/ColumnHintsConverter.cs
+using System;
+using System.Globalization;
+using System.Linq;
+using Avalonia.Collections;
+using Avalonia.Data.Converters;
+using Avalonia.Layout;
+using Avalonia.Utilities;
+
+namespace WalletWasabi.Fluent.Converters
+{
+ public class ColumnHintsConverter : IValueConverter
+ {
+ public static readonly ColumnHintsConverter Instance = new();
+
+ private ColumnHintsConverter()
+ {
+ }
+
+ object? IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is AvaloniaList<int> columnHints)
+ {
+ return string.Join(",", columnHints.Select(x => x.ToString(CultureInfo.InvariantCulture)));
+ }
+
+ return null;
+ }
+
+ object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is string str)
+ {
+ var columnHints = new AvaloniaList<int>();
+ var values = str.Split(',');
+
+ foreach (var s in values)
+ {
+ if (TypeUtilities.TryConvert(typeof(int), s, culture, out var v))
+ {
+ columnHints.Add((int)v);
+ }
+ else
+ {
+ throw new InvalidCastException($"Could not convert '{s}' to {typeof(int)}.");
+ }
+ }
+
+ return columnHints;
+ }
+
+ return null;
+ }
+ }
+}
\ No newline at end of file

ADD
WalletWasabi.Fluent/Converters/WidthTriggersConverter.cs
+using System;
+using System.Globalization;
+using System.Linq;
+using Avalonia.Collections;
+using Avalonia.Data.Converters;
+using Avalonia.Layout;
+using Avalonia.Utilities;
+
+namespace WalletWasabi.Fluent.Converters
+{
+ public class WidthTriggersConverter : IValueConverter
+ {
+ public static readonly WidthTriggersConverter Instance = new();
+
+ private WidthTriggersConverter()
+ {
+ }
+
+ object? IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is AvaloniaList<double> widthTriggers)
+ {
+ return string.Join(",", widthTriggers.Select(x => x.ToString(CultureInfo.InvariantCulture)));
+ }
+
+ return null;
+ }
+
+ object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is string str)
+ {
+ var widthTriggers = new AvaloniaList<double>();
+ var values = str.Split(',');
+
+ foreach (var s in values)
+ {
+ if (TypeUtilities.TryConvert(typeof(double), s, culture, out var v))
+ {
+ widthTriggers.Add((double)v);
+ }
+ else
+ {
+ throw new InvalidCastException($"Could not convert '{s}' to {typeof(double)}.");
+ }
+ }
+
+ return widthTriggers;
+ }
+
+ return null;
+ }
+ }
+}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/ResponsivePanelDemo/ResponsivePanelDemoView.axaml
WalletWasabi.Fluent/Views/ResponsivePanelDemo/ResponsivePanelDemoView.axaml
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:c="using:WalletWasabi.Fluent.Controls"
+ xmlns:conv="using:WalletWasabi.Fluent.Converters"
xmlns:vm="using:WalletWasabi.Fluent.ViewModels.ResponsivePanelDemo"
mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="850"
x:Class="WalletWasabi.Fluent.Views.ResponsivePanelDemo.ResponsivePanelDemoView">
<Label Content="AspectRatio"/>
<TextBox Text="{Binding AspectRatio}"/>
<Label Content="ColumnHints"/>
- <TextBox Text="{Binding ColumnHints, Mode=OneWay}"/>
+ <TextBox Text="{Binding ColumnHints, Converter={x:Static conv:ColumnHintsConverter.Instance}}"/>
<Label Content="WidthTriggers"/>
- <TextBox Text="{Binding WidthTriggers, Mode=OneWay}"/>
+ <TextBox Text="{Binding WidthTriggers, Converter={x:Static conv:WidthTriggersConverter.Instance}}"/>
</StackPanel>
<!-- For adaptive height set RowDefinitions="Auto,*" and AspectRatio="0.5" -->

Add converters