This can be easily achieved by using the convertes:
Add this class in your project and include it in your XAML code
public sealed class BoolToVisibilityConverter : IValueConverter
{
#region Methods
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
bool boolValue = false;
if (!bool.TryParse(System.Convert.ToString(value), out boolValue))
{
boolValue = false;
}
if (boolValue)
{
return true;
}
else
{
return false;
}
}
#endregion
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}
XAML Code:
<UserControl.Resources>
<converter:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
</UserControl.Resources>
<sf:GridTreeColumn MappingName="Readable" PercentWidth="2">
<sf:GridTreeColumn.StyleInfo>
<sf:GridStyleInfo CellType="CheckBox" HorizontalAlignment="Center"
IsThreeState="False" IsEnabled="{Binding Readable, Converter={StaticResource
BoolToVisibilityConverter}}"/>
</sf:GridTreeColumn.StyleInfo>
</sf:GridTreeColumn>
<sf:GridTreeColumn MappingName="Writable" PercentWidth="2">
<sf:GridTreeColumn.StyleInfo>
<sf:GridStyleInfo CellType="CheckBox" HorizontalAlignment="Center"
IsThreeState="False" IsEnabled="{Binding Writable, Converter={StaticResource
BoolToVisibilityConverter}}"/>
</sf:GridTreeColumn.StyleInfo>
</sf:GridTreeColumn>
Hope this helps.