dcsimg
Results 1 to 3 of 3

Thread: Xaml question - Metro App

  1. #1

    Thread Starter
    ex-Administrator brad jones's Avatar
    Join Date
    Nov 2002
    Location
    Indianapolis
    Posts
    6,556

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

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

    --------------------------------------------------------------

  2. #2

    Thread Starter
    ex-Administrator brad jones's Avatar
    Join Date
    Nov 2002
    Location
    Indianapolis
    Posts
    6,556

    Re: Xaml question - Metro App

    I have a second XAML question.....

    I have a button that I've overlayed onto part of an image. This will let me make that part of the image clickable. (Again, if there is a better way to do this, let me know).

    I've made the button completely transparent so the user doesn't see it. What I can't figure out is what settings to change so that when the button is clicked, the button remains transparent. Right now when clicked, it goes white. Is there a setting to turn that clicked color of the button to transparent?

    I've not had time to code in a while, so it is fun getting back into it. As you can see, while I can handle the C#, the interface stuff isn't my thing... yet.

    Thanks,

    Brad!
    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)

    --------------------------------------------------------------

  3. #3
    Addicted Member Quizton's Avatar
    Join Date
    Dec 2005
    Location
    VB Forums
    Posts
    209

    Re: Xaml question - Metro App

    hello,

    i didnt see a click event in the xaml .. maybe throw in a box and add Click event and do onmouseup for action in c#

    im not very advanced as i just began using xaml too but noticed its been a few days

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
  •  



Featured


Click Here to Expand Forum to Full Width