mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-16 03:32:20 +08:00
14 lines
403 B
C#
14 lines
403 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 ? Null : Normal;
|
|
}
|
|
}
|