123456789101112131415161718192021222324 |
- using System.Globalization;
- using System.Windows.Data;
- using System.Windows;
- public class DateTimeToDateConverter : IValueConverter
- {
- public object Convert(
- object value,
- Type targetType,
- object parameter,
- CultureInfo culture)
- {
- return ((DateTime)value).ToString("dd.MM.yyyy");
- }
- public object ConvertBack(
- object value,
- Type targetType,
- object parameter,
- CultureInfo culture)
- {
- return DependencyProperty.UnsetValue;
- }
- }
|