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?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Guest

    Infinity equivalence bug in Single, Double types

    Guest, Jan 16, 2004, in forum: Microsoft Dot NET Framework
    Replies:
    16
    Views:
    621
    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:
    568
    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:
    322
    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:
    937
    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:
    856
    Marko Vuksanovic
    Aug 20, 2006
  6. Marko Vuksanovic

    problem with ListBox in WPF

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

    WPF Listox and Listbox update problem.....

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

    probem with WPF ListBox....

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