How to bind inverse boolean properties in WPF?

You can use a ValueConverter that inverts a bool property for you. XAML: IsEnabled=”{Binding Path=IsReadOnly, Converter={StaticResource InverseBooleanConverter}}” Converter: [ValueConversion(typeof(bool), typeof(bool))] public class InverseBooleanConverter: IValueConverter { #region IValueConverter Members public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (targetType != typeof(bool)) throw new InvalidOperationException(“The target must be a boolean”); return !(bool)value; } public … Read more

How to bind RadioButtons to an enum?

You can further simplify the accepted answer. Instead of typing out the enums as strings in xaml and doing more work in your converter than needed, you can explicitly pass in the enum value instead of a string representation, and as CrimsonX commented, errors get thrown at compile time rather than runtime: ConverterParameter={x:Static local:YourEnumType.Enum1} <StackPanel> … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)