0

I try to find how I can update the Width and Height properties of my custom control.

I have used the RadialProgressBar implementation found in UWP Community Toolkit pull request #828 for 1.5 milestone. I can set the Width and Height on the custom control and it will work but I need to set different Width and Height values depending on the display resolution.

I'm doing something wrong I think but I can't find what.

Any idea?

Bart
  • 9,925
  • 7
  • 47
  • 64
fluxb0x
  • 83
  • 3
  • 10

1 Answers1

0

I found the solution in the answer to this question UWP XAML Change Style of a target with VisualStateManager.

I need to put the VisualStateManager in the Template of the control.

<Setter Property="Template">
    <Setter.Value>
        <ControlTemplate TargetType="local:RadialProgressBar">
            <Grid x:Name="Grid">
                <!-- Put the VisualStateManager definition here -->
            </Grid>
        </ControlTemplate>
    </Setter.Value>
</Setter>

I have updated RadialProgressBar.xaml file in my gist.

Community
  • 1
  • 1
fluxb0x
  • 83
  • 3
  • 10