Sumit Kumawat

Sumit Kumawat

  • NA
  • 454
  • 414.6k

How to bind wait cursor using mvvm in wpf?

Jun 5 2012 1:55 AM
Hi all ,
I am using one Convertor class to show waiting cursor while login here is my code :


 public class BoolToCursor : IValueConverter
    {
        private static readonly BoolToCursor defaultInstance = new BoolToCursor();
        public static BoolToCursor Default { get { return defaultInstance; } }
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return (bool)value ? Cursors.Wait : Cursors.Arrow;
        }
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return (bool)value ? Cursors.Arrow : Cursors.Wait;
        }
    }



and im writing one Bool property in my MVVM which im binding in my XAML code but my waiting cursor is not coming plz help

Answers (2)