themed scroll bars, rounded courners, libmpv update

This commit is contained in:
Frank Skare
2021-08-08 11:55:43 +02:00
parent e9b6988a69
commit fbf50e7466
18 changed files with 1067 additions and 3 deletions

View File

@@ -0,0 +1,33 @@

using System;
using System.ComponentModel;
namespace HandyControl.Tools.Extension
{
public static class StringExtension
{
public static T Value<T>(this string input)
{
try
{
return (T) TypeDescriptor.GetConverter(typeof(T)).ConvertFromString(input);
}
catch
{
return default;
}
}
public static object Value(this string input, Type type)
{
try
{
return TypeDescriptor.GetConverter(type).ConvertFromString(input);
}
catch
{
return null;
}
}
}
}