Re: RCO TabControl style no longer works ...
Hi all
I've found the solution
If I use the style defined in App.xaml with a reference to System.Windows.Controls in the TargetType
ex : <Style x:Key="MyTabControlStyle" TargetType="controls:TabControl">
With a refrence to the dll like that :
xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
The TabControl does'nt appear.
If I set the control template directly in the TabControl like this :
<
Controls:TabControl x:Name="tabControl" Width="208" Margin="0,18.331,0,0.004" VerticalAlignment="Stretch" Background="#FFFFFFFF" MinWidth="0" MinHeight="0" UseLayoutRounding="True">
<Controls:TabControl.Resources>
<ControlTemplate x:Key="MyTabControlTemplate">
<Grid x:Name="TabControlRoot">
<StackPanel Orientation="Vertical" Background="#FFA6A4A4">
<ScrollViewer x:Name="scrollHeader" Canvas.ZIndex="1" Width="207" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" Grid.Column="0" Grid.Row="0" BorderBrush="#FFFBFBFB" BorderThickness="0,0,0,0" Style="{StaticResource ScrollViewerStyle1}">
<primitives:TabPanel x:Name="TabPanel" HorizontalAlignment="Left" VerticalAlignment="Top" />
</ScrollViewer>
<Border x:Name="TabControlContentBorder" Background="{TemplateBinding Background}" BorderThickness="0,0,0,0" Grid.Column="0" Grid.Row="1"><ContentControl x:Name="ContentHost"
Width="208" Foreground="{TemplateBinding Foreground}"
FontSize="{TemplateBinding FontSize}"
FontFamily="{TemplateBinding FontFamily}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"VerticalAlignment="{TemplateBinding VerticalAlignment}"
Margin="0,0,0,0" />
</Border>
</StackPanel>
</Grid></ControlTemplate>
.......
It works fine :-)
This post is on the same suggest and is usefull
http://silverlight.net/forums/t/31597.aspx
--
Best regards
Belmessieri Sylvain (Alti)