Note that there are some explanatory texts on larger screens.

plurals
  1. POStackPanel with rounded and degraded background
    primarykey
    data
    text
    <p>Im trying to create a stackpanel with a rounded background, that also has a linearbrush from grey to trasparent</p> <p>I used the ideas exposed here to prevent clipping <a href="http://chriscavanagh.wordpress.com/2008/10/03/wpf-easy-rounded-corners-for-anything/" rel="nofollow noreferrer">http://chriscavanagh.wordpress.com/2008/10/03/wpf-easy-rounded-corners-for-anything/</a></p> <p>The problem now is that the text inside the stackpanel also has degradation and then turns invisible</p> <p>any help?</p> <p>Similar question <a href="https://stackoverflow.com/questions/120851/how-do-i-create-a-wpf-rounded-corner-container">How do I create a WPF Rounded Corner container?</a></p> <p>Code:</p> <pre><code>&lt;Border Margin="235,78,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" BorderBrush="Red" BorderThickness="1" CornerRadius="8" &gt; &lt;Grid&gt; &lt;Border Name="mask" CornerRadius="7"&gt; &lt;Border.Background&gt; &lt;LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5"&gt; &lt;GradientStop Color="Gray" Offset="0"/&gt; &lt;GradientStop Color="Transparent" Offset="1"/&gt; &lt;/LinearGradientBrush&gt; &lt;/Border.Background&gt; &lt;/Border&gt; &lt;StackPanel Orientation="Horizontal" &gt; &lt;StackPanel.OpacityMask&gt; &lt;VisualBrush Visual="{Binding ElementName=mask}"/&gt; &lt;/StackPanel.OpacityMask&gt; &lt;Image Height="16" Width="16" RenderOptions.BitmapScalingMode="NearestNeighbor" /&gt; &lt;TextBlock Foreground="Black" Margin="5,0,3,0" Text="00620"/&gt; &lt;TextBlock Foreground="Black" Margin="5,0,3,0" Text="Error sincronización" /&gt; &lt;/StackPanel&gt; &lt;/Grid&gt; &lt;/Border&gt; </code></pre>
    singulars
    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.
 

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