public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value is MailFlags == false) { return(null); } MailFlags flags = (MailFlags)value; if ((flags & MailFlags.Forwarded) == MailFlags.Forwarded) { return("/IgOutlook.Modules.Mail;component/Images/Forward16.png"); } else if ((flags & MailFlags.Answered) == MailFlags.Answered) { return("/IgOutlook.Modules.Mail;component/Images/Reply16.png"); } else if ((flags & MailFlags.Seen) == MailFlags.Seen) { return("/IgOutlook.Modules.Mail;component/Images/Mail16.png"); } else { return("/IgOutlook.Modules.Mail;component/Images/Unread16.png"); } }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value == null) { return(null); } MailFlags flags = (MailFlags)value; if ((flags & MailFlags.Flagged) == MailFlags.Flagged) { return("/IgOutlook.Modules.Mail;component/Images/Flagged16.png"); } return("/IgOutlook.Modules.Mail;component/Images/FlagEmpty16.png"); }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value is MailFlags == false) { return(Visibility.Visible); } MailFlags flags = (MailFlags)value; if ((flags & MailFlags.Seen) == MailFlags.Seen) { return(Visibility.Collapsed); } else { return(Visibility.Visible); } }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { MailFlags flags = (MailFlags)value; string mailSection = parameter == null? String.Empty: parameter.ToString(); if ((flags & MailFlags.Flagged) == MailFlags.Flagged) { return(new SolidColorBrush(Colors.Red)); } if (mailSection.Equals("Subject")) { return(new SolidColorBrush(Colors.Gray)); } else { return(new SolidColorBrush(Colors.Black)); } }