Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,
it is possible to set the HorizontalAlignment & VerticalAlignment by a CheckBox in the XAML-Code???

Example:

I hava one CheckBox and one Image. If the CheckBox isChecked, then is my IMAGE HorizontalAlignment = Left and the VerticalAlignment = Top.

But How???

THX!!!!
Posted

1 solution

In normal cases you can only bind matching types together but by using converters you can bind anything to any other thing !

To learn more about converters :
http://blogs.msdn.com/b/bencon/archive/2006/05/10/594886.aspx[^]


http://www.wpftutorial.net/ValueConverters.html[^]


http://www.dev102.com/2008/07/17/wpf-binding-converter-best-practices/[^]

I hope that you get the point ;)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900