allow tiles to fallback to next largest layout possible.
MODIFY
WalletWasabi.Fluent/Controls/TileControl.axaml.cs
WalletWasabi.Fluent/Controls/TileControl.axaml.cs
@@ -41,27 +41,40 @@ namespace WalletWasabi.Fluent.Controls
{
if (_contentPresenter is { })
{
- object? content = null;
+ _contentPresenter.Content = GetClosestSizedContent();
+ }
+ }
- switch (TileSize)
+ private object GetClosestSizedContent()
{
- case TileSize.Large:
- if (LargeSizeContent is { })
+ int currentSize = (int)TileSize;
+
+ while (currentSize > 0)
{
- content = LargeSizeContent;
- }
- break;
+ var tileSize = (TileSize) currentSize;
+ switch (tileSize)
+ {
case TileSize.Wide:
if (WideSizeContent is { })
{
- content = WideSizeContent;
+ return WideSizeContent;
}
break;
+
+ case TileSize.Large:
+ if (LargeSizeContent is { })
+ {
+ return LargeSizeContent;
+ }
+ break;
+
}
- _contentPresenter.Content = content ?? Content;
+ currentSize--;
}
+
+ return Content;
}
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)

allow tiles to fallback to next largest layout possible.