mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-26 16:37:01 +00:00
rename instance method names. Additionally clarified what the math is in the notification manager margin parameter.
49 lines
1.4 KiB
C#
49 lines
1.4 KiB
C#
using Avalonia;
|
|
using Avalonia.Controls;
|
|
using Avalonia.Controls.Notifications;
|
|
|
|
namespace Ryujinx.Ava.UI.Helpers
|
|
{
|
|
public static class ControlExtensions
|
|
{
|
|
public static RyujinxNotificationManager CreateNotificationManager(
|
|
this Window window,
|
|
NotificationPosition visiblePosition = NotificationPosition.BottomRight,
|
|
int maxItems = RyujinxNotificationManager.MaxNotifications,
|
|
Thickness? margin = null
|
|
) => new(window, visiblePosition, maxItems, margin);
|
|
|
|
extension(Control ctrl)
|
|
{
|
|
public int GridRow
|
|
{
|
|
get => Grid.GetRow(ctrl);
|
|
set => Grid.SetRow(ctrl, value);
|
|
}
|
|
|
|
public int GridColumn
|
|
{
|
|
get => Grid.GetColumn(ctrl);
|
|
set => Grid.SetColumn(ctrl, value);
|
|
}
|
|
|
|
public int GridRowSpan
|
|
{
|
|
get => Grid.GetRowSpan(ctrl);
|
|
set => Grid.SetRowSpan(ctrl, value);
|
|
}
|
|
|
|
public int GridColumnSpan
|
|
{
|
|
get => Grid.GetColumnSpan(ctrl);
|
|
set => Grid.SetColumnSpan(ctrl, value);
|
|
}
|
|
|
|
public bool GridIsSharedSizeScope
|
|
{
|
|
get => Grid.GetIsSharedSizeScope(ctrl);
|
|
set => Grid.SetIsSharedSizeScope(ctrl, value);
|
|
}
|
|
}
|
|
}
|
|
}
|