lidermin
lidermin

Reputation: 2832

Add multiple Styles to Silverlight Control

I'm using silverlight and I defined two styles for the page:

Now I want to add those two styles to the same control:

<controls:Expander x:Name="expBRButton" Grid.Row="1" Grid.Column="2" Margin="5" Style="{StaticResource ExpanderBottomRightButtonStyle}">
            <controls:Expander.Content>
                <Button Content="&lt;Button&gt;"></Button>
            </controls:Expander.Content>
        </controls:Expander>

I don't want to join the two styles in one, cause I need them separately too.

I thought something like:

Style="{StaticResource ExpanderBottomRightButtonStyle ExpanderScaleStyle}"

But it's not possible. How should I do this?

I'm new on Silverlight 3.

Thanks in advance.

Upvotes: 4

Views: 908

Answers (1)

AnthonyWJones
AnthonyWJones

Reputation: 189447

The closest you can get using styles alone is to create a third style and specify its BasedOn property pointing at one of your existing styles. You would then need to duplicate the contents of the other style.

Not a very satisfactory solution, however, I've never found a need for this myself.

Upvotes: 1

Related Questions