Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'converters' is an undeclared prefix. Line 8, position 14.
- <?xml version="1.0" encoding="utf-8" ?>
- <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
- xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
- x:Class="Historation.Views.NewPartPage"
- xmlns:converter="clr-namespace:App.Converter">
- <ContentPage.Resources>
- <ResourceDictionary>
- <converters:IntEnumConverter x:Key="IntEnum"/> //<- error on this line
- </ResourceDictionary>
- </ContentPage.Resources>
- namespace App.Converter
- {
- public class IntEnumConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- if (value is Enum)
- {
- return (int)value;
- }
- return 0;
- }
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- if (value is int)
- {
- return Enum.ToObject(targetType, value);
- }
- return 0;
- }
- }
- }
Add Comment
Please, Sign In to add comment