This is a migrated thread and some comments may be shown as answers.

Customizing header of a panel bar

1 Answer 42 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
piyush
Top achievements
Rank 1
piyush asked on 06 Aug 2010, 07:19 AM
Hi

I have added a text box in a RadPanelBarItem.Header and did a databinding with the viewmodel for its text property.However it is not showing text box in panel bar on binding.Can anyone help  me in below ?

<

 

 

telerik1:RadPanelBarItem.Header>

 

 

 

 

<StackPanel Orientation="Horizontal" >

 

 

 

 

<TextBlock Margin="0 0 0 0" Text="Results:" />

 

 

 

 

<TextBox x:Name="txtResultCount" Text="{Binding ResultCount}" Visibility="{Binding IsResultCountVisible, Converter={StaticResource BoolToVisibility}}" VerticalAlignment="Top" Height="16" Width="60"></TextBox>

 

</

 

 

StackPanel>

 

 

 

 

</telerik1:RadPanelBarItem.Header>
ViewModel has below two properties

 

 

 

public Boolean IsResultCountVisible

 

{

 

 

get { return _IsResultCountVisible; }

 

 

 

set { _IsResultCountVisible = value; }

 

}

 

 

public Int32? ResultCount

 

{

 

 

get { return _ResultCount; }

 

 

 

set { _ResultCount = value; }

 

}

1 Answer, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 11 Aug 2010, 02:08 PM
Hello piyush,

Can you make sure that you set the ViewModel as DataContext to the RadPanelBarItem, so you bind to the correct object?
If it' ok, can you please open a support ticket and send us your example demonstrating the problem?
Thank you.

All the best,
Miro Miroslavov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
PanelBar
Asked by
piyush
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
Share this question
or