mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
29 lines
837 B
C#
29 lines
837 B
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows.Data;
|
|
using System.Windows.Media;
|
|
using MapControl;
|
|
|
|
namespace MapControlTestApp
|
|
{
|
|
class MapBackgroundConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
MapBackground mapBackground = (MapBackground)value;
|
|
|
|
if (parameter as string == "Foreground")
|
|
{
|
|
return mapBackground == MapBackground.Light ? Brushes.Black : Brushes.White;
|
|
}
|
|
|
|
return mapBackground == MapBackground.Light ? Brushes.White : Brushes.Black;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|