Skip to content

Instantly share code, notes, and snippets.

@tomwis
Last active Oct 29, 2017
Embed
What would you like to do?
// na stronie z ammy ui
using AmmyUIExmaple.Converters
Frame {
// ... inne właściwości
BackgroundColor: bind Category convert (EntryCategory category) => EntryCategoryToColorConverter.Convert(category)
}
// gdzieś w innym pliku .cs
public static class EntryCategoryToColorConverter
{
public static Color Convert(EntryCategory value)
{
return (Color)App.Current.Resources["EntryCategoryColor" + value];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment