feat: replace ursa demo with nav menu.

This commit is contained in:
rabbitism
2024-02-14 21:45:50 +08:00
parent acd1bdefbc
commit d141831571
3 changed files with 104 additions and 71 deletions

View File

@@ -26,6 +26,12 @@ public class IconNameToPathConverter: IValueConverter
string s = paths[i % paths.Length];
return StreamGeometry.Parse(s);
}
else if (value is string s)
{
int hash = s.GetHashCode();
string path = paths[Math.Abs(hash) % paths.Length];
return StreamGeometry.Parse(path);
}
return AvaloniaProperty.UnsetValue;
}