Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
955
Setting the opacity of the thumb
posted

By default, the thumb is opaque and the HorizontalPreviewContents background has opacity=1 as shown in the above picture. is there a way to reverse this. I found how to set the opacity of the background, but I need to xaml to reverse the opacity of the thumb (to make it clear).

 

 

 

 

 

 

 

<igz:XamZoombar.HorizontalPreviewContent>

 

 

 

 

<ig:XamLinearGauge MaxHeight="40" FontSize="10" Margin="0,0,0,0" VerticalContentAlignment="Top" Opacity=".4">

 

 

 

 

<ig:XamLinearGauge.Background>

Parents
  • 17605
    posted

    You can change the Opacity of the HorizontalThumb with changing its style. You can try this code:

    <Grid x:Name="LayoutRoot" Background="White">      

            <Grid.Resources>

                <LinearGradientBrush x:Key="ScaleElementBrush" EndPoint="0,1" StartPoint="0,0">

                    <LinearGradientBrush.GradientStops>

                        <GradientStopCollection>

                            <GradientStop Color="#FFFBFBFC" Offset="0"/>

                            <GradientStop Color="#FFE0E3E6" Offset="0.708"/>

                        </GradientStopCollection>

                    </LinearGradientBrush.GradientStops>

                </LinearGradientBrush>

                <LinearGradientBrush x:Key="ThumbBackgroundBrush" EndPoint="0,1" StartPoint="0,0"

     

    Opacity="0.1"

    > 

                    <LinearGradientBrush.GradientStops>

                        <GradientStopCollection>

                            <GradientStop Color="#d8ffffff" Offset="1"/>

                            <GradientStop Color="#3fffffff" Offset="0"/>

                        </GradientStopCollection>

                    </LinearGradientBrush.GradientStops>

                </LinearGradientBrush>

     

                <Style x:Key="HorizontalThumbStyle" TargetType="ContentControl">

                    <Setter Property="Template">

                        <Setter.Value>

                            <ControlTemplate TargetType="ContentControl">

                                <Grid>

                                    <Border BorderThickness="0,1,0,1" Margin="0,2" UseLayoutRounding="False">

                                        <Border.BorderBrush>

                                            <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">

                                                <LinearGradientBrush.GradientStops>

                                                    <GradientStopCollection>

                                                        <GradientStop Color="#FFB0B5B9" Offset="0"/>

                                                        <GradientStop Color="#FF7F868D" Offset="1"/>

                                                    </GradientStopCollection>

                                                </LinearGradientBrush.GradientStops>

                                            </LinearGradientBrush>

                                        </Border.BorderBrush>

                                        <Border BorderBrush="{StaticResource ScaleElementBrush}" BorderThickness="0,2">

                                            <Border BorderBrush="#FF9AA0A5" BorderThickness="1"

                                                    Background="{StaticResource ThumbBackgroundBrush}"

                                                    Margin="4,0"/>

                                        </Border>

                                    </Border>

                                </Grid>

                            </ControlTemplate>

                        </Setter.Value>

                    </Setter>

                </Style>

            </Grid.Resources>

            <ig:XamZoombar HorizontalThumbStyle="{StaticResource HorizontalThumbStyle}">

            </ig:XamZoombar>

        </Grid>

     

Reply Children
No Data