RadTabControl Header Binding Issue In MVVM Prsim

2 posts, 0 answers
  1. Anand
    Anand avatar
    12 posts
    Member since:
    Apr 2014

    Posted 15 Jul 2014 Link to this post

    hello All,
    I'm new to Silverlight, MVVM, Telerik, Prsim. I'm trying to Create A RadTabControl which will Have 4 Tabs. So I created 1 Module in My Prism project And I have create RadTabControl
    <telerik:RadTabControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                  Grid.Column="1" Grid.Row="1"  x:Name="AdminTabContainer"
               <telerik:RadTabControl.ItemContainerStyle >
                   <Style TargetType="telerik:RadTabItem">
                       <Setter Property="HeaderTemplate">
                                   <TextBlock Text="{Binding ViewTabName}"/>
               <!-- <telerik:RadTabItem x:Name="UserTab" Header="Users">
                   <Grid Background="Transparent"/>

    And I Created A Another UserTab in View & ViewModel Like this.

    <telerik:RadGridView x:Name="UserTabGridDataView"

    And In my AdminModule.cs

    public void Initialize()
               if (this.regionManager.Regions.ContainsRegionWithName(RegionNames.HPMS_CENTER_REGION))
                   var vm = this.container.Resolve<AdminstratorTab>();
                  var userTab = this.container.Resolve<UsersTabDataGrid>();
                  var b = (IUsersTabDataGridViewViewModel)userTab.ViewModel;
                   b.ViewTabName = "Users";
                   userTab.ViewModel = b;
           protected void RegisterViewsAndServices()
               this.container.RegisterType<IAdminstratorTabViewViewModel, AdminstratorTabViewViewModel>();
               this.container.RegisterType<IUsersTabDataGridViewViewModel, UsersTabDataGridViewViewModel>();

    My UserViewViewModel  is Like this :
    public class UsersTabDataGridViewViewModel : ViewModelBase, IUsersTabDataGridViewViewModel
            public UsersTabDataGridViewViewModel() {
                this.ViewTabName = "Users";
            private string _viewTabName;
            public string ViewTabName
                get { return _viewTabName; }
                set {
                    _viewTabName = value;

    now with this code I'm able to Load the Application But Tab Doesn't Show Tile As Users. How to Resolve this.

    Another Confusion:
    1. Without Creating Custom Region Adapter I was able to See My Tab Control & Grid in that 1 tab. I didn't bind my UserDomainService yet. So it is Not Required. As most of the Froum I digged most of the Devleopers have Implemented. So why it is running in my case.
    2. Even After custom Implementation Situation is same.

  2. Martin Ivanov
    Martin Ivanov avatar
    1549 posts

    Posted 17 Jul 2014 Link to this post

    Hello Anand,

    Thank you for your question.

    I was not able to reproduce your scenario with the provided code. Can you please send me an isolated project that demonstrates your implementation? This will help me in better understanding your scenario and assist you in resolving the reported behavior.

    Thank you for any help you can provide.

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Back to Top