1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using System.Globalization;
- using System.Text;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
- namespace WpfApp4
- {
- 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;
- }
- }
- class Phone
- {
- public string Title { get; set; }
- public string Company { get; set; }
- public int Price { get; set; }
- }
- }
|