WIn_RustTools/RustTools/Helpers/FrameExtensions.cs

9 lines
255 B
C#
Raw Normal View History

2024-07-14 11:24:10 +00:00
using Microsoft.UI.Xaml.Controls;
namespace RustTools.Helpers;
public static class FrameExtensions
{
public static object? GetPageViewModel(this Frame frame) => frame?.Content?.GetType().GetProperty("ViewModel")?.GetValue(frame.Content, null);
}