Ich mag würde meinen abgeschriebenen Code aktualisieren, hier ist sie:erstellen BindableProperty mit der neuesten Version (nicht abgeschrieben)
public static readonly BindableProperty CompletedProperty = BindableProperty.CreateAttached<EntryCompletedBehavior, Command>(
bindable => EntryCompletedBehavior.GetCompleted(bindable), /* staticgetter */
null, /* default value */
BindingMode.OneWay, /* defaultBindingMode */
null, /* validateValue */
(b, o, n) => EntryCompletedBehavior.OnCompletedChanged(b, o, n), /* PropertyChanged */
null, /* PropertyChanging */
null); /* CoerceValue */
Aber ich bin nicht sicher, was in Property, Rückgabetyp, DeclaringType zu setzen und PropertyChanged. Ich habe diesen Code hier http://pause.coffee/blog/..., die derzeit die folgenden Code does'nt Arbeit:
public static readonly BindableProperty CompletedProperty = BindableProperty.CreateAttached(
"Completed", /* string PropertyName */
typeof(Command), /* Type returnType */
typeof(Command), /* Type declaringType */
null, /* default value */
BindingMode.OneWay,
null,
(b, o, n) => EntryCompletedBehavior.OnCompletedChanged(b, o, n),
null,
null);