AC.AvalonControlsLibrary.Controls.IsCurrentMonthConverter.Convert C# (CSharp) Method

Convert() public method

Compares 2 months together
public Convert ( object values, Type targetType, object parameter, System culture ) : object
values object The currently view month and the other month to check
targetType System.Type Target type
parameter object The parameter to use
culture System The current culture in use
return object
        public override object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (values[0] == null)
                return false;

            int currentlyViewedMonth = (int)values[0];
            int otherMonth = (int)values[1];

            return currentlyViewedMonth == otherMonth;
        }
    }
IsCurrentMonthConverter