Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit Using styling inside TabControl
4 replies. Latest Post by haagel on September 11, 2008.
(0)
haagel
Member
97 points
98 Posts
09-11-2008 5:18 AM |
Hi!
I'm having trouble styling a TextBlock that is placed inside a TabControl.
I have created a style in App.xaml:
And use the style like this:
<TextBlock Text="Testing" Style="{StaticResource InputTextBlock}" />
This actually works just fine. The problem occurs when I try to use this style on a TextBlock that is placed inside a TabControl. My xaml is structured like this:
<Grid x:Name="LayoutRoot"> <TabControl> <TabItem> <TextBlock>
If I place the TextBlock outside the TabControl it works fine, but as soon as it is in the TabItem it stops working.
Does anyone have any ideas what the problem is?
I'm using Silverlight 2 Beta 2
Silverli...
Participant
1133 points
193 Posts
09-11-2008 5:36 AM |
Hi,
It is a known issue in Silverlight 2 Beta 2. See more here: http://silverlight.net/forums/t/23616.aspx
It will be fixed in the final.
09-11-2008 5:38 AM |
Strangely, it works fine when I'm styling a TextBox in the same location...
09-11-2008 7:19 AM |
Yes, you can style the TextBox byt set the Properties in xaml. But using Styles gives a problems.
09-11-2008 8:12 AM |
No, I'm actually styling it the same way as I try to style the TextBlock. That is, using a style defined in App.xaml (as described above). And it works!
So, it DOES work with TextBox but it DOES NOT work with TextBlock...