Alvin Bruney [ASP.NET MVP]
5/14/2008 6:32:00 PM
What you want is not a button but rather a checkbox that has some properties
of a button. You should extend the checkbox class, use a template for look
and feel and add custom code to handle the user clicks.
--
Regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------
"Maximilian" <Maximilian@discussions.microsoft.com> wrote in message
news:E1E02939-1FF5-41E4-A464-B6E2EC2E88BB@microsoft.com...
> I want a button-like control (with a bool state) that the user clicks but
> is
> not set instantly but through code based on some conditions... with old
> WinForm I could use a CheckBox with AutoCheck set to false and display as
> button ... but in WPF these properties is not available ... I have googles
> for a solution but found nothing ... The visual apperance can be changed
> with
> a template, that i understand, but how to fix the
> autocheck=false-behaviour?
> Should I base my control on a checkbox or build a custom control? Please
> guide me in a good direction ....
>
> /Max