Pinned chat message + brand wordmark assets. Chat can pin one message to a banner above the feed: ChatMessage.IsPinned, MainViewModel.PinnedChatMessage + Pin/ClearPinnedChatMessageCommand (Helpers/RelayCommandGeneric.cs), LeftPanel pinned-message border bound via NotNullToVis with the feed nudged down.

This commit is contained in:
2026-10-10 14:54:08 -07:00
parent 8e1d6f44db
commit 931ab46783
9 changed files with 56 additions and 1 deletions
+34
View File
@@ -0,0 +1,34 @@
using System;
using System.Windows.Input;
namespace ytLive.Helpers;
public class RelayCommand<T> : ICommand
{
private readonly Action<T?> _execute;
private readonly Predicate<T?>? _canExecute;
public RelayCommand(Action<T?> execute, Predicate<T?>? canExecute = null)
{
_execute = execute;
_canExecute = canExecute;
}
public event EventHandler? CanExecuteChanged
{
add => CommandManager.RequerySuggested += value;
remove => CommandManager.RequerySuggested -= value;
}
public bool CanExecute(object? parameter)
{
if (parameter is T t) return _canExecute?.Invoke(t) ?? true;
return _canExecute?.Invoke(default) ?? true;
}
public void Execute(object? parameter)
{
if (parameter is T t) _execute(t);
else _execute(default);
}
}