<Style x:Key="GroupSecurityRadTreeStyle" TargetType="telerik:RadTreeViewItem"> |
<Setter Property="CheckState" Value="{Binding IsGroupActivated,Mode=TwoWay, Converter={StaticResource CheckStateConverter}}"/> |
<Setter Property="IsExpanded" Value="True"/> |
</Style> |
public class CheckStateConverter : IValueConverter |
{ |
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
{ |
bool? result = (bool?)value; |
if (result.HasValue) |
{ |
return result.Value ? ToggleState.On : ToggleState.Off; |
} |
else |
{ |
ToggleState o = ToggleState.Indeterminate; |
return o; |
} |
} |
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
{ |
ToggleState state = (ToggleState)value; |
return state == ToggleState.On ? true : false; |
} |
} |
/// <summary>
/// Add page to page collection
/// </summary>
/// <param name="content"></param>
/// <param name="title"></param>
private void addContent(UserControl content, string title)
{
ContentControl page = new ContentControl();
page.Content = content;
contentPages.Add(page);
mainContent.Transition =
null //took transition out for now
mainContent.Content = page;
addBreadcrumb(title,page);
}
Im am changing the GridView HeaderCellStyle in code.
Calling .UpdateLayout does not show the new header style.
Private Sub chkComplexFilter_Checked(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles chkComplexFilter.Checked |
ShowFilterHeader("GridViewHeaderCellFilterComplexStyle") |
RadGridView1.UpdateLayout() |
End Sub |
Sub ShowFilterHeader(ByVal styleName As String) |
For Each col In RadGridView1.Columns |
col.HeaderCellStyle = CType(Resources(styleName), Style) |
Next |
End Sub |
Resizing the window (using the bottom right window corner) to make parts of the grid invisible and than visible again causes the new style to be shown in the freshly painted parts.
<DataTemplate> |
<TextBlock Background="Black" Foreground="White" Text="{Binding AssetType}" Width="30"></TextBlock> |
</DataTemplate> |
I have tried modifying background to numberPosition but what it does, is setting the default background.
<grid:GridViewImageColumn DataMemberBinding="{Binding ProtocolTypeBitmap}" Header="Type" UniqueName="Type"/>
Why does my bitmaps never appear? The column is ALLWAYS just white. No error, no nothing. I've checked a million times that the property 'ProtocolTypeBitmap' on the bound to object is valid. It IS a bitmap, it HAS data in it, but never show up. All other properties
(mostly text) that are bound to are showing up fine. The same INSTANCE of this object is used in another part of the app where the bitmap is shown using other techs. So something is going wrong with GridViewImageColumn.
Any ideas?