You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
506 B
19 lines
506 B
using System;
|
|
using Avalonia.Controls;
|
|
|
|
namespace DiscordChatExporter.Gui.Framework;
|
|
|
|
public class Window<TDataContext> : Window
|
|
{
|
|
public new TDataContext DataContext
|
|
{
|
|
get =>
|
|
base.DataContext is TDataContext dataContext
|
|
? dataContext
|
|
: throw new InvalidCastException(
|
|
$"DataContext is null or not of the expected type '{typeof(TDataContext).FullName}'."
|
|
);
|
|
set => base.DataContext = value;
|
|
}
|
|
}
|