Hi,
I have two radiobuttons on my view and there IsChecked property is binded to the ViewModel property IsDynamic , problem
is that when i change the selection of first radion button first time the binding works ,but when i check another
radion button the IsChecked property is not updated. I am using the enum boolean converter. My xaml file
is
<
RadioButton Grid.Column="0" Content="Static" IsChecked="{Binding Path=IsDynamic, Converter={StaticResource enumBooleanConverter },ConverterParameter=Static,Mode=TwoWay}" TabIndex="1" GroupName="Static"/>
="Dynamic"/>
and the EnumBooleanConverter is
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
string parameterString = parameter as string;
if (parameterString == null)
return DependencyProperty.UnsetValue;
if (Enum.IsDefined(value.GetType(), value) == false)
object parameterValue = Enum.Parse(value.GetType(), parameterString);
return parameterValue.Equals(value);
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
return Enum.Parse(targetType, parameterString);
The isDynamic property on ViewModel is as follows
public
IsDynamic
set
//this.currentAccountSet.IsDynamic = value;
.Dynamic))
;
.Static))
.IsDynamic);
get
.isDynamic;
and the ENUM is as follows
public enum AccountSetDynamic
Static=0,
Dynamic=1
i cannot figure out where i am doing wrong ,please help out
Hello Nazish,
I have noticed that in your second radio button you are handling Checked event Checked="RadioButton_Checked", may be something in that event is causing this behavior; if possible please share the code.
Also please note that this forum post is specific to Infragistics wpf controls and looks like your request is related to MS WPF controls.
i simply set the IsHitTestVisible property to True and it works! can you plz explain what this property has effect ?
I found the below information on web regarding this property UIElement.IsHitTestVisible Property. I would suggest you to contact Microsoft Support for more information on this issue.