Binding- 数据转换

1,前端:

    
        
    

                    
                        
                            
                                
                                    

后台转换类定义:

    public class ConvertCustomer : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return (bool)value ? false : true;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }


你可能感兴趣的:(.net)