This question is locked. New answers and comments are not allowed.
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
AdminTabControl.xaml
And I Created A Another UserTab in View & ViewModel Like this.
UserTab.xaml
And In my AdminModule.cs
My UserViewViewModel is Like this :
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.
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
AdminTabControl.xaml
<
telerik:RadTabControl
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
Grid.Column
=
"1"
Grid.Row
=
"1"
x:Name
=
"AdminTabContainer"
Prism:RegionManager.RegionName
=
"AdminTabContainerRegion"
>
<
telerik:RadTabControl.ItemContainerStyle
>
<
Style
TargetType
=
"telerik:RadTabItem"
>
<
Setter
Property
=
"HeaderTemplate"
>
<
Setter.Value
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding ViewTabName}"
/>
</
DataTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
</
telerik:RadTabControl.ItemContainerStyle
>
<!-- <
telerik:RadTabItem
x:Name
=
"UserTab"
Header
=
"Users"
>
<
Grid
Background
=
"Transparent"
/>
</
telerik:RadTabItem
>-->
</
telerik:RadTabControl
>
And I Created A Another UserTab in View & ViewModel Like this.
UserTab.xaml
<
telerik:RadGridView
x:Name
=
"UserTabGridDataView"
Grid.Column
=
"0"
Grid.Row
=
"0"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Top"
HorizontalContentAlignment
=
"Left"
/>
And In my AdminModule.cs
public void Initialize()
{
this.RegisterViewsAndServices();
if (this.regionManager.Regions.ContainsRegionWithName(RegionNames.HPMS_CENTER_REGION))
{
var vm = this.container.Resolve<
AdminstratorTab
>();
this.regionManager.Regions[RegionNames.HPMS_CENTER_REGION].Add(vm);
var userTab = this.container.Resolve<
UsersTabDataGrid
>();
var b = (IUsersTabDataGridViewViewModel)userTab.ViewModel;
b.ViewTabName = "Users";
userTab.ViewModel = b;
this.regionManager.Regions[RegionNames.HPMS_ADMINTAB_REGION].Add(userTab);
}
}
protected void RegisterViewsAndServices()
{
this.container.RegisterType<
AdminstratorTab
>();
this.container.RegisterType<
IAdminstratorTabViewViewModel
, AdminstratorTabViewViewModel>();
this.container.RegisterType<
UsersTabDataGrid
>();
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;
OnPropertyChanged("ViewTabName");
}
}
}
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.