DataBinding Error No Property, Bindable Property or Event Found

Hey Guys,

i want to make a Bindable Property but i get this Error:
No Property, Bindable Property or Event Found

in Xaml:
Checked="{Binding NoticeUserData}"

in my class:
public static BindableProperty CheckboxProperty =
BindableProperty.Create(nameof(Checked), typeof(bool), typeof(Checkbox), true);

public bool Checked
return (bool)GetValue(CheckboxProperty);
SetValue(CheckboxProperty, value);

What do i miss? Can anyone help me i have never done before a databinding Property.

Thanks for help!


  • Try this. Pay attention for lines about BindableProperty naming rules.
    There are lot of usefull stuf in xamarin documentation.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    1 - Here's a link to an article on reusable controls that should help with the bindable property issue

    2 - Here a link to an article on formatting your post so the code doesn't get mangled by the forum parser.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Snippets are a wonderful feature of Visual Studio.
    Long along I added a snippet for making BindableProperties. now I just type nubnd {tab} then fill in variable fields.
    Add this as a .snippet file to your Visual Studio C# snippets directory and make life a lot easier on yourself.

    <?xml version= "1.0" encoding= "utf-8" ?>
    <CodeSnippets  xmlns= " ">
      <CodeSnippet Format= "1.0.0 ">
          <Title> New BindableProperty</Title>
          <Shortcut> nubnd</Shortcut>
          <Description> Code snippet for a BindableProperty </Description>
          <Author> Clint StLaurent</Author>
            <SnippetType> Expansion</SnippetType>
              <ID> type</ID>
              <ToolTip> BindableProperty type</ToolTip>
              <Default> string</Default>
              <ID> property</ID>
              <ToolTip> Property name</ToolTip>
              <Default> MyProperty</Default>
              <ID> parentType</ID>
              <ToolTip> Type of the parent control</ToolTip>
              <Default> ParentControlType</Default>
              <ID> defaultValue</ID>
              <ToolTip> defaultValue</ToolTip>
              <Default> string.Empty</Default>
          <Code Language= "csharp ">
            #region $property$ (Bindable $type$)
            public static readonly BindableProperty $property$Property = 
                BindableProperty.Create(propertyName: "$property$",
                                        returnType: typeof($type$),
                                        declaringType: typeof($parentType$),
                                        defaultValue: $defaultValue$);
            public $type$ $property$
                get { return ($type$)GetValue($property$Property); }
                set { SetValue($property$Property, value); }
            #endregion $property$ (Bindable $type$)
  • Thanks for all Answers.

    Special Thanks to BenjaminToole that was the problem Thank you :)

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    @BenjaminToole said:
    The Placeholder for the BindableProperty 'CheckboxProperty' should always match the name without 'Property'.

    So instead of 'Checked' it should be 'Checkbox'.

    Its a naming convention that Xamarin goes by. Took me a while to figure out too as it wasn't well documented.

    Great answer. I would also point out that CheckBoxProperty is a bad name and does not follow industry naming conventions. IsChecked would be a property name for a bool of this purpose. Following naming conventions keeps the rest of your team from being confused by your code, and shows you care about following standards.

  • TottikaTottika Member


    Thanks for the answer it was very helpful!

  • DennyyDennyy Member ✭✭
Sign In or Register to comment.