cornelionut wrote:
Binding="{Binding Path=btnStartVM , ElementName=btnStart}"
That tells the trigger to bind to a property called
btnStartVM
directly on the element called
btnStart
. Since
btnStart
is a
RibbonButton
, it doesn't have a property called
btnStartVM
.
Try removing the
ElementName
from your bindings:
<Style x:Key="btnTriggers" TargetType="{x:Type RibbonButton}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=btnStartVM}" Value="True">
<Setter Property="IsEnabled" Value="True"/>
</DataTrigger>
<DataTrigger Binding="{Binding Path=btnStartVM}" Value="False">
<Setter Property="IsEnabled" Value="False"/>
</DataTrigger>
</Style.Triggers>
</Style>