Custom slider control - flyout with current value not visible RRS feed

  • Question

  • Hello,

    I have built a custom slider control for my Windows Store app.

    Everything is working fine except for the value flyout on top of my control.

    The thing is, that my "Flyout" is a border with a textblock in it. If the slider gets moved the border gets moves accordingly.

    The problem is, that my border is cut of by any other UI control is passes. Basically I want to accomplish a similar behaviour as the default slider control.

    here is the control Style from the Generics.xaml

        <Style TargetType="local:CustomSlider">
            <Setter Property="Template">
                    <ControlTemplate TargetType="local:CustomSlider">
                            <Canvas x:Name="PART_Canvas" Margin="0" Height="40" ManipulationMode="All" Background="Transparent">
                                <Border x:Name="PART_Border"  Height="40" Width="40" BorderBrush="#002056" BorderThickness="3" Margin="0,-60,0,0" Background="White" >
                                    <TextBlock x:Name="PART_TextBlock"  Text="0" FontSize="20" HorizontalAlignment="Center" Grid.Row="1" VerticalAlignment="Center" Foreground="Black" />
                                <Thumb x:Name="PART_Thumb"
                                    Canvas.ZIndex="10" HorizontalAlignment="Center" VerticalAlignment="Center" />


    Monday, October 28, 2013 2:04 PM

All replies

  • Try setting Canvas.ZIndex for Border element and see if it works.

    Thanks, Sachin

    • Edited by Sachin S Monday, October 28, 2013 3:56 PM
    Monday, October 28, 2013 3:55 PM
  • Hello Sachin,

    that was my first guess as well. But it doesn't help.

    Canvas.ZIndex only applies for the "PART_Canvas" Control.  It unfortunately doesn't affect anything outside my custom slider control.

    Do you have any other suggestions?

    Kind regards


    Monday, October 28, 2013 4:51 PM
  • Hi Simon, 

    ZIndex should have fixed this issue. Just a guess, can you try setting ZIndex on custom control and see if it works for you? If possible,can you upload a sample project and I can have a look.

    Thanks, Sachin

    Tuesday, October 29, 2013 12:57 PM