TemplateBinding in wpf style setter?

Viewed 8427

I'm using <setter> in my wpf application and i need to use TemplateBinding for that setter Property to evaluate that value at compile time but i can't use TemplateBinding,its throwing an error,

My Code Is Below:

                <ControlTemplate TargetType="{x:Type srcview:ButtonView}">
                    <Button>
                        <Button.Style>
                            <Style TargetType="{x:Type Button}">
                                <Style.Triggers>
                                    <Trigger Property="IsMouseOver" Value="True">
                                        <Setter Property="Background" Value="{TemplateBinding Color}"></Setter>
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </Button.Style>
                    </Button>
                </ControlTemplate>

How can i use TemplateBinding in my style setter or Is there any other way to evaluate the value at compile time?

3 Answers
Related