WPF equivalence to checkBox1.AutoCheck = false

Discussion in 'Microsoft Dot NET Framework' started by Maximilian, May 13, 2008.

  1. Maximilian

    Maximilian Guest

    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
     
    Maximilian, May 13, 2008
    #1
    1. Advertisements

  2. 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" <> wrote in message
    news:...
    > 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
     
    Alvin Bruney [ASP.NET MVP], May 14, 2008
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest

    Infinity equivalence bug in Single, Double types

    Guest, Jan 16, 2004, in forum: Microsoft Dot NET Framework
    Replies:
    16
    Views:
    438
    Jon Skeet [C# MVP]
    Jan 27, 2004
  2. LOBOMINATOR

    WinFx: WPF Dynamically build UI

    LOBOMINATOR, Aug 9, 2006, in forum: Microsoft Dot NET Framework
    Replies:
    8
    Views:
    333
    Guest
    Nov 9, 2006
  3. Marko Vuksanovic

    WPF and codeBehind file problem....

    Marko Vuksanovic, Aug 19, 2006, in forum: Microsoft Dot NET Framework
    Replies:
    0
    Views:
    163
    Marko Vuksanovic
    Aug 19, 2006
  4. Marko Vuksanovic

    WPF and codeBehind file problem....

    Marko Vuksanovic, Aug 20, 2006, in forum: Microsoft Dot NET Framework
    Replies:
    0
    Views:
    640
    Marko Vuksanovic
    Aug 20, 2006
  5. Marko Vuksanovic

    WPF databinding and Listbox

    Marko Vuksanovic, Aug 20, 2006, in forum: Microsoft Dot NET Framework
    Replies:
    0
    Views:
    580
    Marko Vuksanovic
    Aug 20, 2006
Loading...

Share This Page