I am trying to write an application where the user is looking at data either before or after the thumb on a XamDateTimeSlider, and I want to use the track fill with a custom arrow shape I created to indicate which way the thumb is oriented at a given time.
Is there any way to switch which side of the thumb the trackfill is on? I'm able to get something close to what i want using a negative margin on my shape, like so:
<Style x:Key="TrackFillStyleLeft" TargetType="igPrim:TrackFill"> <Setter Property="FlowDirection" Value="RightToLeft"/> <Setter Property="Template" > <Setter.Value> <ControlTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="30"/> <ColumnDefinition Width="60"/> <ColumnDefinition/> </Grid.ColumnDefinitions> <Polygon Grid.Column="0" Points="20,25 20,5 10,15" Fill="Blue" Margin="-80,0,0,0"/> <Rectangle Grid.Column="1" Height="20" Width="60" Fill="Blue" Margin="-180,0,0,20"/> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style>
But the fill arrow still collapses as you bring it to the minimum side of the slider, and it sticks out over the edge when brought to the maximum side.
Thanks.
Hello John,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Thanks for writing the sample. It wasn't exactly what I needed, since I was already extensively altering the control template for the XamDateTimeSlider, but looking at the code gave me enough ideas that I was able to achieve the look I wanted.
Thank you for your post. I have been looking into and I created a sample project for you with the functionality you want. Basically I handled the XamDateTimeSlider’s ThumbValueChanged event and in its handler I checked in which direction the Thumb is moved and set the Track and TrackFill to different colors. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.