Okay, this is a basic 101 level question....
I've created a metro app. On my screen I have a rectangle. I put a text box on top of the rectangle.
In the designer, this looks great (left side of image). When I run the app, the text is not displayed in the rectangle - it moves (right side of image).
Question 1 - what is the right way to display text within a rectangle and make sure the two stick together?
Question 2 - if the way I am doing it is okay, then what am I doing wrong...
Code:<Rectangle HorizontalAlignment="Left" Height="164" Margin="1019,343,0,0" Stroke="Black" VerticalAlignment="Top" Width="265" StrokeThickness="6" RadiusX="35" RadiusY="35"> <Rectangle.Fill> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="Black"/> <GradientStop Color="#FF6167DE" Offset="1"/> </LinearGradientBrush> </Rectangle.Fill> </Rectangle> <TextBlock HorizontalAlignment="Center" Margin="960,116,24,0" TextWrapping="Wrap" VerticalAlignment="Center" Height="118" Width="233" FontSize="36" TextAlignment="Center" Foreground="#FFF2FD00"> <Run Text="YOU SOLVED "/> <LineBreak/> <Run Text="THE PUZZLE!"/> </TextBlock>





Reply With Quote
