public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { UserStoryType type = (UserStoryType)value; if (type.Equals(UserStoryType.BUG)) { if (ViewModelBase.IsInDesignModeStatic) { return("../Resources/Icons/BugIcon.png"); } else { return(new BitmapImage(new Uri("pack://application:,,,/Resources/Icons/BugIcon.png"))); } } else if (type.Equals(UserStoryType.USERSTORY)) { if (ViewModelBase.IsInDesignModeStatic) { return("../Resources/Icons/UserStoryIcon.png"); } else { return(new BitmapImage(new Uri("pack://application:,,,/Resources/Icons/UserStoryIcon.png"))); } } throw new ArgumentException("UserStoryIconConverter can't convert this property!"); }
//public ICommand UpdateOrder { get; private set; } //public ICommand DeleteOrder { get; private set; } public UserStoryTypeViewModel() { //NewOrders = new RoutedCommand(NewOrder); //AddOrder = new RoutedCommand(CreateOrder); // UpdateOrder = new RoutedCommand(EditOrder); //DeleteOrder = new RoutedCommand(RemoveOrder); //connect(); LoadOrders(); UserStoryType = new UserStoryType(); }