2011-11-14 16 views

答えて

1

私はあなたがValue Converterを使用する必要があり、この場合だと思います。

public class MaxCountConverter : IValueConverter 
{ 
    public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 
    { 
     return (int)value - 1; 
    } 

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

おそらくエラー処理や処理が必要になるでしょう。これはちょうど始点を与えるだけです。

0

1を引くコンバータを使用します。

関連する問題