I have a custom UserControl that provides the following dependency property: CanEdit. The property was created using the fragment, and the generated code:
#region CanEdit
public static readonly DependencyProperty CanEditProperty =
DependencyProperty.Register("CanEdit", typeof(bool), typeof(RequisitionItem),
new PropertyMetadata((bool)false));
public bool CanEdit {
get { return (bool)GetValue(CanEditProperty); }
set { SetValue(CanEditProperty, value); }
}
#endregion
I am trying to set this property to True in the parent UserControl, for example:
<RequisitionItem CanEdit="True" />
but the property remains False. Why is this?
source
share