2

i have a gridview column like this

                   <GridViewColumn>
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <Button Content="Share"  Click="fileShareClick" CommandParameter="{Binding Files}"  >
                                    <Button.Style>
                                        <Style TargetType="Button">
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding IsSharedAllowed}" Value="false">
                                                    <Setter Property="IsEnabled" Value="false"/>
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </Button.Style>
                                </Button>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>

Im currently using a theme (elysium). As u can see, im using a which makes use of which targets "Button". However this overwrites my current button theme. Is there anyway to prevent this from happening?

3
  • then set it again in the style.. Commented Jul 16, 2013 at 12:39
  • @tanuj_loop Sorry, I don't understand too clearly. Could you please explain in more detail, perhaps with an example? Thank you very much Commented Jul 16, 2013 at 12:54
  • 2
    If you have access to the button style defined by your "elysium" theme you can use the BasedOn property on your new button style to inherit the elysium button style. Commented Jul 16, 2013 at 13:03

1 Answer 1

1

Converting my comment to an answer.

If you have access to the button style defined by your "elysium" theme you can use the BasedOn property on your new button style to inherit the elysium button style

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.