mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-12-27 12:35:35 +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;
|
||
|
}
|
||
|
}
|