public FontAndColorsResourceKey(
            Guid category, string name, FontAndColorsResourceKeyType keyType)
        {
            var isFontKey = keyType == FontAndColorsResourceKeyType.FontFamily ||
                            keyType == FontAndColorsResourceKeyType.FontSize;

            if (!isFontKey && name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }

            Category = category;
            Name     = name;
            KeyType  = keyType;
        }
Exemplo n.º 2
0
 private static bool IsBrushKeyType(FontAndColorsResourceKeyType keyType)
 {
     return
         (keyType == FontAndColorsResourceKeyType.BackgroundBrush ||
          keyType == FontAndColorsResourceKeyType.ForegroundBrush);
 }