in FamilyNotes/Controls/Converters.cs [72:97]
public object Convert(object value, Type targetType, object parameter, string language)
{
Debug.Assert(value != null, "Expecting a value to convert");
Debug.Assert(parameter != null, "Expecting a parameter describing the caller");
NoteInputMode currentNoteMode = (NoteInputMode)value;
// If the ink control is calling, make it visible if the note is in Ink mode
if (parameter.Equals("Ink"))
{
return currentNoteMode == NoteInputMode.Ink ? Visibility.Visible : Visibility.Collapsed;
}
// If the text control is calling, make it visible if the note is in text mode
if (parameter.Equals("Text"))
{
bool textMode =
currentNoteMode == NoteInputMode.Dictation ||
currentNoteMode == NoteInputMode.Text ||
currentNoteMode == NoteInputMode.Default;
return textMode ? Visibility.Visible : Visibility.Collapsed;
}
return Visibility.Visible; // everything else should be visible.
}