Font picker
This commit is contained in:
parent
1ac753e6ff
commit
f038c63718
9 changed files with 289 additions and 51 deletions
30
WPFCatalog/FontFamilyStringConverter.cs
Normal file
30
WPFCatalog/FontFamilyStringConverter.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace WPFCatalog
|
||||
{
|
||||
public class FontFamilyStringConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
FontFamily fontfamily = new FontFamily("Verdana");
|
||||
if (value != null)
|
||||
{
|
||||
fontfamily = new FontFamily(value.ToString());
|
||||
}
|
||||
return fontfamily;
|
||||
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue