//private void DoOpenProject() //{ // MessageBox.Show(_path); //} protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e) { if (e.Property == IsFavoriteProperty) { this.ClassificationCategory = DateClassificationCategory.Get(this); } base.OnPropertyChanged(e); }
// public DelegateCommand Command { get; private set; } public RecentProject(string path, CodeContainer info) { _path = path; _info = info; this.Info = new FileInfo(path); this.IsFavorite = _info.IsFavorite; this.ClassificationCategory = DateClassificationCategory.Get(this); // this.Command = new DelegateCommand(this.DoOpenProject); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { switch (value) { case RecentProject project: return(DateClassificationCategory.Get(project)); case DateTimeOffset t: return(DateClassificationCategory.Get(t.DateTime)); default: return(null); } }