Nishant Rana

Nishant Rana

  • NA
  • 20
  • 0

How to check for Maximum property of a ProgressBar in a trigger statement

Nov 30 2010 5:16 AM

I have a style defined for my custom ProgressBar control. I have a dependency property (Type: double) ("testDoubleVariable") for which I want to perform some action when my testVariable value equals to Maximum value of my control ( as I might be providing some dynamic value for Maximum property). my sample code snippet is:
 
<ControlTemplate.Triggers>
            <Trigger Property="testDoubleVariable" Value="Maximum">
              <Setter Property="Visibility" TargetName="TestElement" Value="Visible"/>
            </Trigger>
</ControlTemplate.Triggers>

But I do understand this way it can't be done.

Is there any other way to perform trigger when my "testDoubleVariable" equals to "Maximum" value of control.

I dont want to do this in codes, just in xaml.

Thanks in advance for ur suggestions

Rgds

Nishant