Note that there are some explanatory texts on larger screens.

plurals
  1. POBorder widths displays inconsistently
    primarykey
    data
    text
    <p>Lets take this as example. I now have a total of 8 textboxes. I use a static resource style to make sure they all have the exact same styling set. But notice how some of the textboxes have a bottom border line and others don't. Why does this happen?</p> <p><img src="https://i.stack.imgur.com/uHifs.jpg" alt="enter image description here"> Here's the code</p> <pre><code>&lt;Style x:Key="AddressTextBox" TargetType="TextBox"&gt; &lt;Setter Property="MinWidth" Value="230"&gt;&lt;/Setter&gt; &lt;Setter Property="MaxWidth" Value="260"&gt;&lt;/Setter&gt; &lt;Setter Property="MaxLength" Value="45"&gt;&lt;/Setter&gt; &lt;Setter Property="Margin" Value="1"&gt;&lt;/Setter&gt; &lt;Setter Property="BorderThickness" Value="1,1,1,1"/&gt; &lt;Setter Property="HorizontalAlignment" Value="Left"/&gt; &lt;Setter Property="Padding" Value="1,2,0,1"/&gt; &lt;Setter Property="BorderBrush" Value="Gray"&gt;&lt;/Setter&gt; &lt;Setter Property="Height" Value="20"&gt;&lt;/Setter&gt; &lt;/Style&gt; &lt;DockPanel&gt; &lt;StackPanel&gt; &lt;Grid Margin="5"&gt; &lt;StackPanel&gt; &lt;DockPanel Height="Auto"&gt; &lt;TextBlock Width="50" Margin="7"&gt;Postal&lt;/TextBlock&gt; &lt;TextBox Style="{StaticResource AddressTextBox}"&gt;&lt;/TextBox&gt; &lt;/DockPanel&gt; &lt;DockPanel Height="Auto"&gt; &lt;TextBlock Width="50" Margin="7"&gt;&lt;/TextBlock&gt; &lt;TextBox Style="{StaticResource AddressTextBox}"&gt;&lt;/TextBox&gt; &lt;/DockPanel&gt; &lt;DockPanel Height="Auto"&gt; &lt;TextBlock Width="50" Margin="7"&gt;&lt;/TextBlock&gt; &lt;TextBox Style="{StaticResource AddressTextBox}"&gt;&lt;/TextBox&gt; &lt;/DockPanel&gt; &lt;DockPanel Height="Auto"&gt; &lt;TextBlock Width="50" Margin="7"&gt;&lt;/TextBlock&gt; &lt;TextBox Style="{StaticResource AddressTextBox}"&gt;&lt;/TextBox&gt; &lt;/DockPanel&gt; &lt;DockPanel Height="10"&gt;&lt;/DockPanel&gt; &lt;DockPanel Height="Auto"&gt; &lt;TextBlock Width="50" Margin="7"&gt;Street&lt;/TextBlock&gt; &lt;TextBox Style="{StaticResource AddressTextBox}"&gt;&lt;/TextBox&gt; &lt;/DockPanel&gt; &lt;DockPanel Height="Auto"&gt; &lt;TextBlock Width="50" Margin="7"&gt;&lt;/TextBlock&gt; &lt;TextBox Style="{StaticResource AddressTextBox}"&gt;&lt;/TextBox&gt; &lt;/DockPanel&gt; &lt;DockPanel Height="Auto"&gt; &lt;TextBlock Width="50" Margin="7"&gt;&lt;/TextBlock&gt; &lt;TextBox Style="{StaticResource AddressTextBox}"&gt;&lt;/TextBox&gt; &lt;/DockPanel&gt; &lt;DockPanel Height="Auto"&gt; &lt;TextBlock Width="50" Margin="7"&gt;&lt;/TextBlock&gt; &lt;TextBox Style="{StaticResource AddressTextBox}"&gt;&lt;/TextBox&gt; &lt;/DockPanel&gt; &lt;/StackPanel&gt; &lt;/Grid&gt; &lt;/StackPanel&gt; &lt;/DockPanel&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.
    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