feat: use popup instead of flyout. improve demo.

This commit is contained in:
rabbitism
2024-02-14 00:22:09 +08:00
parent 7051521040
commit ec41a8228f
6 changed files with 167 additions and 60 deletions

View File

@@ -8,9 +8,9 @@ public class NavMenuMarginConverter: IMultiValueConverter
{
public object? Convert(IList<object?> values, Type targetType, object? parameter, CultureInfo culture)
{
if (values[0] is double indent && values[1] is int level)
if (values[0] is double indent && values[1] is int level && values[2] is bool b)
{
return new Thickness(indent * (level-1), 0, 0, 0);
return b ? new Thickness() : new Thickness(indent * (level-1), 0, 0, 0);
}
return AvaloniaProperty.UnsetValue;
}