Results 1 to 3 of 3

Thread: Xaml question - Metro App

Threaded View

  1. #1

    Thread Starter
    ex-Administrator brad jones's Avatar
    Join Date
    Nov 2002

    Xaml question - Metro App

    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...

    <Rectangle HorizontalAlignment="Left" Height="164" Margin="1019,343,0,0" Stroke="Black" VerticalAlignment="Top" Width="265" StrokeThickness="6" RadiusX="35" RadiusY="35">
          <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
             <GradientStop Color="Black"/>
             <GradientStop Color="#FF6167DE" Offset="1"/>
    <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 "/>
        <Run Text="THE PUZZLE!"/>
    Attached Images Attached Images  
    Have you given out your reputation points today? Select the Rate This Post link to give points for good posts!
    Brad! Jones
    Lots of Software, LLC
    (My recent articles) (I wrote: Web 2.0 Heroes!) (My Blog) (Follow me on Twitter)


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width