Note that there are some explanatory texts on larger screens.

plurals
  1. POIn WPF Gradient Button pulses between the default color and new gradient once clicked - how to stop
    primarykey
    data
    text
    <p>This is a very annoying artifact I am noticing of WPF and I was curious what I could potentially be doing wrong as I am doing what appears to be simple code in WPF XAML:</p> <pre><code>&lt;Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="ExampleShapes.MainWindow" x:Name="Window" Title="MainWindow" Width="400" Height="400"&gt; &lt;Grid x:Name="LayoutRoot"&gt; &lt;Button Margin="50,50,50,50" Content="I pulse when clicked Why?"&gt; &lt;Button.Background&gt; &lt;LinearGradientBrush EndPoint="0,1" StartPoint="0,0"&gt; &lt;GradientStop Color="#FF0C0B0B" Offset="1"/&gt; &lt;GradientStop Color="#FFBF5656"/&gt; &lt;/LinearGradientBrush&gt; &lt;/Button.Background&gt; &lt;/Button&gt; &lt;/Grid&gt; </code></pre> <p></p> <p>It appears that there are some defaults that are in .NET that I am unaware of with events of the MouseOver and Click that I DO NOT WANT. I don't mind that when the mouse hovers that it changes the color of the gradient to the default but when I remove it it changes back. However even before applying underlying C# code for the 'CLICK' event (not in example) it assumes a 'pulsing' behavior of going between my specified gradient and the default. This is also true with a simple color. What gives?</p> <p>For further info I am designing on a Windows 7 64 bit box with Visual Studio 2010 and Expression Blend 3 using .NET 4.0 for VS2010 unsure for EB3 as it's an older copy and they Both do this. Is there a simple way to change the default behavior or do I have to set up a new user template for the button?</p> <p>Any help is much appreciated thanks!</p>
    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.
 

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