/// <summary> /// Refreshes tasks view /// </summary> /// <param name="task"></param> public void Refresh(TaskModel task) { this.Task = task; this.DataContext = Task; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Task")); PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("DataContext")); }
private void UpdateImageStatusIndicatorToolTip() { if (this.DataContext is TaskModel) { TaskModel task = (TaskModel)this.DataContext; this.ImageStatusIndicator.ToolTip = GetTooltipBasedOnStatus(task.Status); } }
/// <summary> /// Creates an instance of a taskt content view window /// </summary> /// <param name="taskModel"></param> public TaskContentViewWindow(TaskModel taskModel) { Task = taskModel; this.DataContext = Task; InitializeComponent(); }
private void UpdateImageStatusIndicatorIcon() { if (this.DataContext is TaskModel) { TaskModel task = (TaskModel)this.DataContext; BitmapImage bi = new BitmapImage(); bi.BeginInit(); bi.UriSource = new Uri(GetIconBasedOnStatus(task.Status), UriKind.Relative); bi.EndInit(); this.ImageStatusIndicator.Source = bi; } }