-1

In my .xaml file, I have something like in the following.

    <TextBlock   Text="......"   ..... Margin="5,3,4,2"/>
    <ScrollViewer  Margin="2,3,7,9">
              <TextBlock Margin=3,6,5,7">
    </ScrollViewer>

There is no effect in the margins set for above controls. No effect at all. Is it because of the ScrollViewer which contains the second TextBlock ?

nidarshani fernando
  • 493
  • 4
  • 10
  • 26

1 Answers1

-1

Try setting VerticalAlignment and HorizontalAlignment for each element with a margin like this

VerticalAlignment="Top" HorizontalAlignment="Left" Margin="20,20"

Chances are the margins are working but since you don't have a fixed position for the elements it might be hard to notice the difference especially since your margins are on the smaller side.

CJK
  • 952
  • 2
  • 10
  • 22