0
我的依賴屬性未綁定在控件中。IsEnable我的控件的屬性不綁定在xaml中
public bool EnableMe
{
get { return (bool)GetValue(EnableMeProperty); }
set { SetValue(EnableMeProperty, value); }
}
public static readonly DependencyProperty EnableMeProperty =
DependencyProperty.Register("EnableMe", typeof(bool), typeof(OwnwrClasss), new PropertyMetadata(null));
<Button IsEnabled="{Binding Source=EnableMe}" >
<Image Source="/Images/icon.png" x:Name="btnShow"/>
<Button>
我想動態地啓用和禁用此按鈕。