Skip to content

Instantly share code, notes, and snippets.

@tomwis
Last active October 29, 2017 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomwis/ebd9822f166e4759437400e9aa7bdfb8 to your computer and use it in GitHub Desktop.
Save tomwis/ebd9822f166e4759437400e9aa7bdfb8 to your computer and use it in GitHub Desktop.
// 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