mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-12-26 20:26:00 +08:00
14 lines
413 B
C#
14 lines
413 B
C#
using System.Windows;
|
|
using System.Windows.Controls;
|
|
|
|
namespace BililiveRecorder.WPF.Converters
|
|
{
|
|
internal class NullValueTemplateSelector : DataTemplateSelector
|
|
{
|
|
public DataTemplate Normal { get; set; }
|
|
public DataTemplate Null { get; set; }
|
|
|
|
public override DataTemplate SelectTemplate(object item, DependencyObject container) => item is null ? this.Null : this.Normal;
|
|
}
|
|
}
|