mirror of
https://github.com/jayfunc/BetterLyrics.git
synced 2026-01-12 10:54:55 +08:00
26 lines
769 B
C#
26 lines
769 B
C#
using BetterLyrics.WinUI3.Enums;
|
|
using BetterLyrics.WinUI3.Extensions;
|
|
using Microsoft.UI.Xaml.Controls;
|
|
using Microsoft.UI.Xaml.Data;
|
|
using System;
|
|
|
|
namespace BetterLyrics.WinUI3.Converter
|
|
{
|
|
public partial class LyricsLayoutOrientationToOrientationConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, string language)
|
|
{
|
|
if (value is LyricsLayoutOrientation orientation)
|
|
{
|
|
return orientation.ToOrientation();
|
|
}
|
|
return Orientation.Horizontal;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|