Sandkassa2: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Replaced content with "Tester syntaxhighlight....<syntaxhighlight lang="c#"> using System; using System.Globalization; using System.Windows.Data; using TPG.GDK.Windows.Common; namespace MariaGDKTester { public class ColorConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var cColor = (TPG.GDK.CommonCore.Primitives.Color)value; return Utils.ToWinColor(cColor); }...") Tags: Replaced Visual edit |
||
Line 1: | Line 1: | ||
Tester syntaxhighlight.... | Tester syntaxhighlight....<syntaxhighlight lang="c#"> | ||
using System; | |||
using System.Globalization; | |||
using System.Windows.Data; | |||
using TPG.GDK.Windows.Common; | |||
namespace MariaGDKTester | |||
{ | |||
public class ColorConverter : IValueConverter | |||
{ | |||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | |||
{ | |||
var cColor = (TPG.GDK.CommonCore.Primitives.Color)value; | |||
return Utils.ToWinColor(cColor); | |||
} | |||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | |||
{ | |||
var wColor = (System.Windows.Media.Color)value; | |||
return Utils.FromWinColor(wColor); | |||
} | |||
} | |||
} | |||
</syntaxhighlight> | |||
Revision as of 13:05, 3 August 2022
Tester syntaxhighlight....
using System;
using System.Globalization;
using System.Windows.Data;
using TPG.GDK.Windows.Common;
namespace MariaGDKTester
{
public class ColorConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var cColor = (TPG.GDK.CommonCore.Primitives.Color)value;
return Utils.ToWinColor(cColor);
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
var wColor = (System.Windows.Media.Color)value;
return Utils.FromWinColor(wColor);
}
}
}