Silverlight Border object not showing when applying theme?

I have one of the Silverlight Toolkit themes in my XAML page and now for some reason my Border objects are not showing. Is it by design? I made sure to explicitly set the BorderBrush color to contrast with the theme's background, but that doesn't fix the problem.

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

 <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>

      

0


a source to share


2 answers


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



By explicitly setting the BorderThickness property to a value (not equal to zero), I got my border to display.

0


a source


Also, I can recommend Silverlight Spy . One of the features of Silverlight Spy is to provide a tree of all controls, display all their properties, and provide the ability to dynamically change them. This greatly reduces the time to solve this problem. I've used it several times on cases like yours.



0


a source







All Articles