Print Page | Close Window

HorizontalAlignment in Canvas

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: MarkupLabel Control
Forum Description: Topics Related to Codejock MarkupLabel Control
URL: http://forum.codejock.com/forum_posts.asp?TID=22882
Printed Date: 24 April 2024 at 1:35pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: HorizontalAlignment in Canvas
Posted By: cpede
Subject: HorizontalAlignment in Canvas
Date Posted: 08 February 2016 at 4:29am
I don't know if this is an error, or just because I don't know enough about XSAML.

When I write this I expected the hyperlink to be right aligned, on a red background filling the entire control:

<Canvas Background="#ff0000">
<TextBlock HorizontalAlignment='Right'>
<Hyperlink Cursor='Hand'>Link</Hyperlink>
</TextBlock>
</Canvas>

But that fails, and I have to do this instead:

<Grid Background="#ff0000">
<TextBlock HorizontalAlignment='Right'>
<Hyperlink Cursor='Hand'>Link</Hyperlink>
</TextBlock>
</Grid>

-cpede


-------------
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)



Replies:
Posted By: olebed
Date Posted: 14 April 2017 at 2:36pm
Hello,

I can advice to using Canvas.Right tag
<Canvas Background="#ff0000">
  <TextBlock Canvas.Right="0">
    <Hyperlink Cursor='Hand'>Link</Hyperlink>
  </TextBlock>
</Canvas>

Regards,
 Oleksandr Lebed



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