views:

436

answers:

2

I have a applied one of the Silverlight Toolkit themes to my XAML page, and now for some reason my Border objects don't show up. Is this by design? I've made sure to explicitly state a BorderBrush color that should contrast the theme background, but this does not fix the issue.

In case it helps, the theme I'm using is the BureauBlack theme from the Silverlight Toolkit. And here is a code snippet of one of my Borders.

 <Border VerticalAlignment="Top" Grid.Column="0" Grid.Row="2" Grid.RowSpan="2" BorderBrush="Orange"  CornerRadius="10" Margin="0" Height="300">
        <StackPanel>
            <TextBlock Text="Status Panel" FontSize="20" TextAlignment="Center" />
            ...
        </StackPanel>
 </Border>
A: 

It looks like when a theme is loaded it loads its own default set of values for most object properties. In this case, the BorderThickness property of the border object defaults to 0. As a result you don't see it.

By explicitly giving the BorderThickness property a value (non-zero ofcourse), I got my border to show up.

Overhed
A: 

In addition, I can recommend Silverlight Spy tool. One of the feature of Silverlight Spy is to provide a tree of all controls, to display all their properties and to provide an ability to dynamically change them. It greatly decrease time for such problem resolving. I've used it several times in cases like your.

Alexander K.