Good day,
I had a Silverlight demo project build on top of prism illustrating UI composition.
One of the key members of my demo was a TabControl with a region which gets populated OnDemand.
I've migrated the project to use Telerik controls and one change I made was switching from TabControl to RadTabControl (I am using Telerik controls vs 2011.1.315.1040) and now a couple of things that worked before stopped working now.
The RadTabControl code I use:
Any help would be greatly appreciated.
Thanks in advance,
Dragos
I had a Silverlight demo project build on top of prism illustrating UI composition.
One of the key members of my demo was a TabControl with a region which gets populated OnDemand.
I've migrated the project to use Telerik controls and one change I made was switching from TabControl to RadTabControl (I am using Telerik controls vs 2011.1.315.1040) and now a couple of things that worked before stopped working now.
- For the TabItem.ItemContainerStyle I had the following setting:
Now when I create new tabs in the TabControl they will have no name -> ugly and not what I wanted. How can I get the ViewName to show up in the TabItem?<SetterProperty="HeaderTemplate"><Setter.Value><!--Display the child view name on the tab header--><DataTemplate><!--for some reason this does not work with radTabControl--><TextBlockText="{Binding ViewName}"/></DataTemplate></Setter.Value></Setter> - I populated the TabControl with the following code
Which correctly inserted the tabItem and navigated to the correct tab.DimlRegAsIRegion =Me.mRegionManager.Regions("RequestsTabReqion")DimlRqViewIDAsString= CommonDefinitions.Constants.BuildRqViewName(iRqId)DimlInfoCardsViewAsRequestDetailsView = TryCast(lReg.GetView(lRqViewID), RequestDetailsView)IflInfoCardsViewIsNothingThenlInfoCardsView =NewRequestDetailsView()DimlRegMan1AsIRegionManager = lReg.Add(lInfoCardsView, lRqViewID,True)lInfoCardsView.SetRegionManager(lRegMan1)lInfoCardsView.PopulateWithInfoCards()mRegionManager.Regions("RequestsTabReqion").Activate(lInfoCardsView)ElsemRegionManager.Regions("RequestsTabReqion").Activate(lInfoCardsView)EndIf
With the RadTabControl the tab is created but the content area associated to the Tab is not shown. Also the repositioning on the correct tab no longer works.
How can I get this to work with the RadTabControl?
The RadTabControl code I use:
<telerik:RadTabControl Grid.Row="1" AutomationProperties.AutomationId="RequestTabView" DropDownDisplayMode="Visible" Margin="2,2,2,2" prism:RegionManager.RegionName="RequestsTabReqion" BackgroundVisibility="Collapsed" prism:RegionManager.RegionContext="{Binding CurrentEmployee}" TabStripPlacement="Top" BorderThickness="3" BorderBrush="#FF6B43A9" Background="{x:Null}" ></telerik:RadTabControl>Any help would be greatly appreciated.
Thanks in advance,
Dragos