Print Page | Close Window

PushButton Color

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=17945
Printed Date: 27 September 2024 at 10:19am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: PushButton Color
Posted By: cannones
Subject: PushButton Color
Date Posted: 23 February 2011 at 2:24pm
Hi All,

I am using the pushbutton control with markup enabled and wanted to know how can I set the color so that it covers the full size of the button..

Sam



Replies:
Posted By: Oleg
Date Posted: 24 February 2011 at 1:25am
Hi,

Markup in push button will have actual size of your content - you can't stretch it to whole button. Think its easer to set .UseVisualStyle property to False and set BackColor property to Color you need.


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


Posted By: cannones
Date Posted: 24 February 2011 at 1:57am
Hi Oleg,

I just about got it working using markup although the text appeared centered at the top .. Doing what you suggested works although the appearance of the button does not look as nice. No rounded borders..

Below is the XAML I set in the caption property of the pushbutton..

"<TextBlock FontFamily='Century Gothic' Background='#00FF4C' Width='210' Height='65' FontSize='14' TextAlignment='Center' >" + "CASH" + "</TextBlock>" )

Sam



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