Note that there are some explanatory texts on larger screens.

plurals
  1. POProgressBar clips the very top of value
    primarykey
    data
    text
    <p>I'm having a slight problem with reskinning a ProgressBar in WPF. Specifically, no matter what I do, it seems to clip the inner indicator at about 99%. I've tried all sorts of things, from clipping to OpacityMask, but I can't seem to stop the top from cutting off. Any ideas what's going on here?</p> <p>Code:</p> <pre><code> &lt;Style x:Key="BarrelStyle" TargetType="{x:Type ProgressBar}"&gt; &lt;Setter Property="Value" Value="100" /&gt; &lt;Setter Property="Orientation" Value="Vertical" /&gt; &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="{x:Type ProgressBar}"&gt; &lt;Grid&gt; &lt;Border CornerRadius="10" BorderThickness="1" Padding="3,3,3,3" x:Name="PART_Track" Background="Blue"&gt; &lt;Border x:Name="PART_Indicator" CornerRadius="10" BorderBrush="#FFC06565" BorderThickness="0" HorizontalAlignment="Stretch" VerticalAlignment="Bottom"&gt; &lt;Grid&gt; &lt;Border x:Name="Indicator_Content" CornerRadius="10" Background="Red" BorderBrush="White" BorderThickness="1"/&gt; &lt;Border x:Name="Indicator_Gloss" CornerRadius="10" &gt; &lt;Border.Background&gt; &lt;LinearGradientBrush EndPoint="1.0,0.5" StartPoint="0.05,0.5"&gt; &lt;GradientStop Color="#75000000" Offset="0"/&gt; &lt;GradientStop Color="#7EFFFFFF" Offset="0.5"/&gt; &lt;GradientStop Color="#75000000" Offset="1"/&gt; &lt;/LinearGradientBrush&gt; &lt;/Border.Background&gt; &lt;/Border&gt; &lt;/Grid&gt; &lt;/Border&gt; &lt;/Border&gt; &lt;/Grid&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload