Print Page | Close Window

HOW TO: XAML Markup images as background

Printed From: Codejock Forums
Category: General
Forum Name: XAML Snippets
Forum Description: Post your XAML snippets here for everyone to enjoy :)
URL: http://forum.codejock.com/forum_posts.asp?TID=11125
Printed Date: 27 September 2024 at 6:48pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: HOW TO: XAML Markup images as background
Posted By: cpede
Subject: HOW TO: XAML Markup images as background
Date 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 (22.1.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)



Replies:
Posted By: Oleg
Date Posted: 20 June 2008 at 1:42pm
yes. Use Grid for example
 
<Grid>
<Image...>
<TextBlock ...>
</Grid>


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: cpede
Date Posted: 23 June 2008 at 3:28am
Can the Image be stretched to fit the Cell? Or other attributes?
 
-cpede


Posted By: Oleg
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net