Slider color

Hi,

Is it possible to control the color of a <Slider> ?

Thanks

Yes it is possible, but it depends on what Theme you are using.

<App Theme="Basic">
    <StackPanel>
        <Slider>
            <float4 ux:Value="#f00" ux:Key="C500" />
            <float4 ux:Value="#000" ux:Key="CLine" />
        </Slider>
        <Slider>
            <float4 ux:Value="#0f0" ux:Key="C500" />
            <float4 ux:Value="#f0f" ux:Key="CLine" />
        </Slider>
        <Slider>
            <float4 ux:Value="#00f" ux:Key="C500" />
            <float4 ux:Value="#426" ux:Key="CLine" />
        </Slider>
    </StackPanel>
</App>

BasicTheme uses resources keys for its colors, so you can change them. For NativeTheme there is no exposed way to change the colors at the moment. We are working on better ways to customize components in fuse and especially native!

Hi Vegard,

Where do find the key info? can you guide me? i couldn’t find it in the UX Class information

The keys are defined in BasicTheme, we do not have any docs for this as this is subject to change very soon (to something better).

But here is a list of all the keys defined in BasicTheme

CLine
CFillFore
CEmptyFore
CShadow
C50
C100
C200
C300
C400
C500
C600
C700
C800
C900

You can use this until what we are working on is ready :slight_smile:

Vegard Strand Lende wrote:

The keys are defined in BasicTheme, we do not have any docs for this as this is subject to change very soon (to something better).

But here is a list of all the keys defined in BasicTheme

CLine
CFillFore
CEmptyFore
CShadow
C50
C100
C200
C300
C400
C500
C600
C700
C800
C900

You can use this until what we are working on is ready :slight_smile:

Thanks :slight_smile: