I'm creating some custom View element:
public class ExtendableButtonList : StackLayout
{
public static readonly BindableProperty NewSlotNameProperty = BindableProperty.Create(
propertyName: "NewSlotName",
returnType: typeof(string),
declaringType: typeof(ExtendableButtonList),
defaultValue: default(string));
public string NewSlotName
{
get { return (string)GetValue(NewSlotNameProperty); }
set { SetValue(NewSlotNameProperty, value); }
}
public delegate void OnLoadHandler(ExtendableButtonList ebl);
public event OnLoadHandler OnLoadEvent;
public ExtendableButtonList (){
//not all properies are loaded at this point
}
[...]
}
I need to do some actions on properties that are passed through XAML to this object. Unfortunately, when constructor of ExtendableButtonList class is being called, not all BindableProperties are loaded at this time. They appear later on.
How would I know when all properties are loaded in this object? When to call OnLoadEvent to let my app know that this object is ready for further usage?