Hi,
i am adding 2 custom dependency properties, for the one of type string everything works fine.
for the second one of type Boolean it did not work.
i tried to find the cause but it seems for me there is no error(i even tried to change the type to string, and when i did, it worked fine), is there a special way of binding boolean ?.
this the code i am using:
the view class:
public static readonly DependencyProperty IsReadyProperty = DependencyProperty.Register("IsReady", typeof (Boolean),
typeof (
ReportBuilderView),
new PropertyMetadata(
IsReadyChanged));
public Boolean IsReady
{
set
{
this.SetValue(IsReadyProperty, value);
}
get { return (Boolean)this.GetValue(IsReadyProperty); }
}
Binding myBinding2 = new Binding("IsReadyForQuerying");
myBinding2.Source = viewModel.IsReadyForQuerying;
myBinding2.Mode = BindingMode.TwoWay;
BindingOperations.SetBinding(this, ReportBuilderView.IsReadyProperty, myBinding2);
IsReady = false;
the view model part:
private Boolean _isReady;
public Boolean IsReadyForQuerying
{
get { return _isReady; }
set
{
_isReady = value;
this.RaisePropertyChanged(() => this.IsReadyForQuerying);
}
}