0

I have simple control consisting from button, image inside, and TextBlock. The problem is, that TextBlock takes some extra space on top of actual text, which visually screws some of my margins (especially between image and text). Here is picture with TextBlock selected in Snoop. Problematic TextBlock

Here is style for TextBlock used:

<Style x:Key="ManagerNameStyle" TargetType="{x:Type TextBlock}">
    <Setter Property="Margin" Value="5, 0, 5, 3"/>
    <Setter Property="HorizontalAlignment" Value="Center"/>
    <Setter Property="Height" Value="Auto"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
    <Setter Property="FontSize" Value="13"/>
    <Setter Property="FontFamily" Value="Segoe UI"/>
    <Setter Property="Text" Value="Patients"/>
</Style>

Empty project with created TextBlock using this style also has same space.

Simple text

So, can i somehow remove this space? Could it be reserved for some specific symbols?

lentinant
  • 792
  • 1
  • 10
  • 36

1 Answers1

0

Play with the Padding property.

<Setter Property="Padding" Value="10, 4, 5, 3"/>

If not negativ margins could be the solution.

soydachi
  • 851
  • 1
  • 9
  • 24