Codejock Forums Homepage
Forum Home Forum Home > General > XAML Snippets
  New Posts New Posts RSS Feed - HOW TO: XAML Markup images as background
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

HOW TO: XAML Markup images as background

 Post Reply Post Reply
Author
Message
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Location: Denmark
Status: Offline
Points: 666
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Topic: HOW TO: XAML Markup images as background
    Posted: 20 June 2008 at 7:07am
Is it possible to have an image as a background in Markup and write text on top?
 
-cpede
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 June 2008 at 1:42pm
yes. Use Grid for example
 
<Grid>
<Image...>
<TextBlock ...>
</Grid>
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Location: Denmark
Status: Offline
Points: 666
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Posted: 23 June 2008 at 3:28am
Can the Image be stretched to fit the Cell? Or other attributes?
 
-cpede
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 23 June 2008 at 5:40am
Hello,
 
it stretched by default.
 
Enter in MarkupPad:
 
<Page xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
<Grid>
 <Image Source="file://c:\windows\zapotec.bmp"/>
  <TextBlock Cursor="Hand" VerticalAlignment="Center" HorizontalAlignment="Center">Enter Text Here</TextBlock>
</Grid>
</Page>
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.160 seconds.