Skip to content

Instantly share code, notes, and snippets.

@tomwis
Last active October 29, 2017 18:09
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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