Note that there are some explanatory texts on larger screens.

plurals
  1. POBlinking button on WPF application
    text
    copied!<p>My WPF application has a style manager that I have built on blend.</p> <p>My problem is this: I've got a login button that blinks occasionally and i can't figure out how to remove this behavior.</p> <p>Here's the style code for my login box:</p> <pre><code>&lt;Style x:Key="LoginBoxGrid" TargetType="{x:Type Grid}"&gt; &lt;Setter Property="Background"&gt; &lt;Setter.Value&gt; &lt;ImageBrush ImageSource="/Client;component/Assets/images/LoginBox.png" Stretch="None" TileMode="Tile"/&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;Setter Property="Opacity" Value="0.765"/&gt; &lt;Setter Property="Width" Value="411"/&gt; &lt;Setter Property="HorizontalAlignment" Value="Left"/&gt; &lt;Setter Property="Margin" Value="126,150,0,111"/&gt; &lt;/Style&gt; &lt;Style x:Key="LoginBoxHeader" TargetType="{x:Type Label}"&gt; &lt;Setter Property="Grid.Column" Value="2"/&gt; &lt;Setter Property="Margin" Value="-16.183,18.347,0,0"/&gt; &lt;Setter Property="Width" Value="64.994"/&gt; &lt;Setter Property="FontSize" Value="16"/&gt; &lt;Setter Property="FontWeight" Value="Bold"/&gt; &lt;Setter Property="FontStyle" Value="Italic"/&gt; &lt;Setter Property="Foreground" Value="White"/&gt; &lt;Setter Property="VerticalAlignment" Value="Top"/&gt; &lt;Setter Property="HorizontalAlignment" Value="Left"/&gt; &lt;Setter Property="FontFamily" Value="/Client;component/Assets/Fonts/#Arial Black"/&gt; &lt;/Style&gt; &lt;Style x:Key="LoginBtn" TargetType="{x:Type Button}"&gt; &lt;Setter Property="Grid.Column" Value="2"/&gt; &lt;Setter Property="Margin" Value="16.6,9.022,9.282,8"/&gt; &lt;Setter Property="Grid.Row" Value="4"/&gt; &lt;Setter Property="Width" Value="164"/&gt; &lt;Setter Property="BorderThickness" Value="0"/&gt; &lt;Setter Property="Opacity" Value="0.78"/&gt; &lt;Setter Property="IsDefault" Value="True"/&gt; &lt;Setter Property="Foreground" Value="White"/&gt; &lt;Setter Property="Background"&gt; &lt;Setter.Value&gt; &lt;ImageBrush ImageSource="/Client;component/Assets/images/LoginBtn.png"/&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; </code></pre> <p>And here's my code for the window:</p> <pre><code>&lt;Grid Style="{StaticResource LoginBoxGrid}" &gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="0.127*"/&gt; &lt;ColumnDefinition Width="0.326*"/&gt; &lt;ColumnDefinition Width="0.462*"/&gt; &lt;ColumnDefinition Width="0.085*"/&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="0.269*"/&gt; &lt;RowDefinition Height="0.028*"/&gt; &lt;RowDefinition Height="0.256*"/&gt; &lt;RowDefinition Height="0.223*"/&gt; &lt;RowDefinition Height="0.178*"/&gt; &lt;RowDefinition Height="0.046*"/&gt; &lt;/Grid.RowDefinitions&gt; &lt;Label Content="User Name" Grid.Column="1" Margin="43.986,23.1,8,8" Grid.Row="2" Width="82" BorderThickness="0" FontFamily="Arial" FontWeight="Bold" FontStyle="Italic"/&gt; &lt;Label Content="Password" Grid.Column="1" Margin="43.986,15.873,8,8" Grid.Row="3" Width="82" BorderThickness="0" FontFamily="Arial" FontWeight="Bold" FontStyle="Italic"/&gt; &lt;PasswordBox Grid.Column="2" Name="PassTb" HorizontalAlignment="Left" Margin="8,18.877,0,8" Grid.Row="3" Width="172.6" d:LayoutOverrides="Height"/&gt; &lt;TextBox Grid.Column="2" Name="UserTb" HorizontalAlignment="Left" Margin="9.282,23.1,0,11.004" Grid.Row="2" TextWrapping="Wrap" Text="TextBox" Width="172.6" d:LayoutOverrides="Height"/&gt; &lt;Label Style="{StaticResource LoginBoxHeader}" Content="Login" /&gt; &lt;Button Name="LoginBtn" Style="{StaticResource LoginBtn}" Content="Login" /&gt; &lt;/Grid&gt; </code></pre> <p>The Button I'm talking about is called "LoginBtn", as is its style.</p> <p>How can I remove that blinking behavior? Thanks in advance.</p>
 

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