Telerik Forums
UI for WPF Forum
4 answers
179 views
Hi,

I am binding a treeview to a collection of objects. This is for use in a user/group permissions for my application.
The treeview is displaying up to four levels

The tree binds to a property on the object of type bool? , to achieve the tri state. 

This is the ItemContainerStyle for the treeview
 <Style x:Key="GroupSecurityRadTreeStyle" TargetType="telerik:RadTreeViewItem">  
    <Setter Property="CheckState" Value="{Binding IsGroupActivated,Mode=TwoWay, Converter={StaticResource CheckStateConverter}}"/>  
    <Setter Property="IsExpanded" Value="True"/>          
 </Style> 

The value converter;
   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;  
        }  
    } 

The binding to the tree works perfectly, the problem I am having is when an treeviewitem is in the indeterminate state on the tree view.

When an item has been put in the indeteminate state, the (ToggleState)value in the ConvertBack method is set to 'Off', I would have expected this to be set to 'Indeterminate'.

I know the ConvertBack method doesn't actually deal with the indeterminate state, but that is due to me not being able to get it.

Is there something I am doing wrong?

Thanks,

A Marshall
Miroslav
Telerik team
 answered on 26 Feb 2010
1 answer
107 views
Hi, Telerik.

I want to set a toolbar in a RadDocumentPane as the picture showing.

I try to use the RadToolBar control instead, but it looks a little ugly.

I wonder if there is any other way to achieve it.

Wish your help!

Thank you!
Ivan
Telerik team
 answered on 26 Feb 2010
1 answer
28 views
Hi, Telerik.

I need your help.

While I click the maximizeButton on the RadWindow in a xbap application,the RadWindow lost a part of its bottom.

Is there any way to solve this? Or how can I get the maximizeButton event?

Thank you!

Konstantina
Telerik team
 answered on 26 Feb 2010
3 answers
185 views
Hi ...
How disable input the drop down of the calender.
IsReadonly doesn't seem to prevent this.

I want to lock the control...

thanks again!!!!!!!!!!!!
Konstantina
Telerik team
 answered on 26 Feb 2010
1 answer
98 views
I've noticed today that when i move my cursor over the title bar of a tile view item it seems to 'stick' a little

I am running a fairly hi-res screen (1920x1080) and have 6 tile items on the screen, one maximised and the others minimised at the bottom

within one tileviem i have a grid with about 1000 rows of data.

when i move the mouse around the screen i get a definate 'pause' as it moves over the title bar, i think as it trys to apply the 'focus glow'

I'm runnning the 2010 Beta software, I didnt notice it before
Tihomir Petkov
Telerik team
 answered on 26 Feb 2010
2 answers
100 views
Not sure if this is a problem with the transition control or my code

I have a page with a menu on it and when i select an option I 'navigate' to the page by setting the content of the transistion control to the new page

sometimes i've noticed that the page does not display, infact the screen stays the same.  If i minimise and then maximise the window, the page that should have been displayed is there

code looks something like this

 

/// <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);

}

Cameron Molyneux
Top achievements
Rank 1
 answered on 26 Feb 2010
5 answers
189 views

Im am changing the GridView HeaderCellStyle in code.
Calling .UpdateLayout does not show the new header style.

    Private Sub chkComplexFilter_Checked(ByVal sender As ObjectByVal 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.

Stefan Dobrev
Telerik team
 answered on 26 Feb 2010
2 answers
59 views
Hi Vlad,

I have the following column in my RadGridView:


1
1
1
1
1
2
2
2
2
2
3
3
3
3
3
4
4
4


The column gets its data from a particular column of a List in code-behind. 
If i write the following data template: will each group header display the numbers one by one?

<DataTemplate> 
<TextBlock Background="Black" Foreground="White" Text="{Binding AssetType}" Width="30"></TextBlock> 
</DataTemplate> 


For me the header remains blank.

Also, why am i not able to find a link on your site to create my own thread?
jimit r
Top achievements
Rank 1
 answered on 26 Feb 2010
1 answer
91 views

I have tried modifying background to numberPosition but what it does, is setting the default background.

Andrey
Telerik team
 answered on 26 Feb 2010
1 answer
99 views
Given this XAML

 

 

<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?

Vlad
Telerik team
 answered on 26 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?