Click here to Skip to main content
15,890,506 members
Home / Discussions / WPF
   

WPF

 
QuestionWhen WPF manipulation is ON, ListBox SelectionChanged event isn't fired Pin
Roberto Mazzone24-Jul-12 1:04
Roberto Mazzone24-Jul-12 1:04 
GeneralHow to get all Office version installed using SilverLight Pin
dinhhtvn22-Jul-12 17:43
dinhhtvn22-Jul-12 17:43 
GeneralRe: How to get all Office version installed by SilverLight Pin
Mycroft Holmes22-Jul-12 19:03
professionalMycroft Holmes22-Jul-12 19:03 
AnswerRe: How to get all Office version installed using SilverLight Pin
Christian Amado23-Jul-12 2:59
professionalChristian Amado23-Jul-12 2:59 
GeneralRe: How to get all Office version installed using SilverLight Pin
dinhhtvn31-Jul-12 23:13
dinhhtvn31-Jul-12 23:13 
GeneralRe: How to get all Office version installed using SilverLight Pin
Ed Hill _5_3-Aug-12 4:22
Ed Hill _5_3-Aug-12 4:22 
GeneralHow to bind inverse boolean properties? - [Answered] Pin
Alisaunder22-Jul-12 13:23
Alisaunder22-Jul-12 13:23 
GeneralRe: How to bind inverse boolean properties? Pin
Mycroft Holmes22-Jul-12 18:07
professionalMycroft Holmes22-Jul-12 18:07 
I have a set of NOT converters!

C#
public class BooleanNotConverter : IValueConverter
{
    object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        bool bReturn = false;
        int iValue;
        try
        {
            if (Int32.TryParse(value.ToString(), out iValue))
            {
                bReturn = iValue != 0;
            }
            else
            {
                Boolean.TryParse(value.ToString(), out bReturn);
            }
        }
        catch { bReturn = false; }
        return !bReturn;
    }

    object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        int iReturn = 0;

        bool bReturn = false;
        Boolean.TryParse(value.ToString(), out bReturn);
        if (!bReturn)
        { iReturn = -1; }

        return iReturn;
    }
}


And the xaml
XML
IsEnabled="{Binding IsLocked,Converter={StaticResource BooleanNotConverter}}"


And the App.xaml resource
C#
<!--Converter Resource-->
<ResourceDictionary>
    <converter:BooleanNotConverter x:Key="BooleanNotConverter"/>
</ResourceDictionary>

Never underestimate the power of human stupidity
RAH

GeneralRe: How to bind inverse boolean properties? Pin
Alisaunder22-Jul-12 18:28
Alisaunder22-Jul-12 18:28 
GeneralRe: How to bind inverse boolean properties? Pin
Mycroft Holmes22-Jul-12 19:02
professionalMycroft Holmes22-Jul-12 19:02 
GeneralRe: How to bind inverse boolean properties? Pin
Alisaunder23-Jul-12 3:58
Alisaunder23-Jul-12 3:58 
GeneralRe: How to bind inverse boolean properties? Pin
Alisaunder23-Jul-12 4:27
Alisaunder23-Jul-12 4:27 
GeneralRe: How to bind inverse boolean properties? Pin
SledgeHammer0123-Jul-12 12:18
SledgeHammer0123-Jul-12 12:18 
GeneralRe: How to bind inverse boolean properties? Pin
Mycroft Holmes23-Jul-12 12:50
professionalMycroft Holmes23-Jul-12 12:50 
GeneralRe: How to bind inverse boolean properties? Pin
SledgeHammer0123-Jul-12 12:56
SledgeHammer0123-Jul-12 12:56 
GeneralRe: How to bind inverse boolean properties? Pin
Mycroft Holmes23-Jul-12 14:25
professionalMycroft Holmes23-Jul-12 14:25 
GeneralAnother MVVM questionn regarding updating info on other controls? - [Answered] Pin
Alisaunder21-Jul-12 4:36
Alisaunder21-Jul-12 4:36 
AnswerRe: Another MVVM questionn regarding updating info on other controls? Pin
Pete O'Hanlon21-Jul-12 8:06
mvePete O'Hanlon21-Jul-12 8:06 
GeneralRe: Another MVVM questionn regarding updating info on other controls? Pin
Christian Amado21-Jul-12 11:45
professionalChristian Amado21-Jul-12 11:45 
GeneralRe: Another MVVM questionn regarding updating info on other controls? Pin
Alisaunder21-Jul-12 12:30
Alisaunder21-Jul-12 12:30 
GeneralRe: Another MVVM questionn regarding updating info on other controls? Pin
Mycroft Holmes21-Jul-12 13:52
professionalMycroft Holmes21-Jul-12 13:52 
GeneralRe: Another MVVM questionn regarding updating info on other controls? Pin
Alisaunder21-Jul-12 14:59
Alisaunder21-Jul-12 14:59 
GeneralRe: Another MVVM questionn regarding updating info on other controls? Pin
Mycroft Holmes21-Jul-12 16:14
professionalMycroft Holmes21-Jul-12 16:14 
GeneralRe: Another MVVM questionn regarding updating info on other controls? Pin
Pete O'Hanlon22-Jul-12 21:52
mvePete O'Hanlon22-Jul-12 21:52 
QuestionAdding datagrid cell images at runtime doesn't appear in cell Pin
alleyes20-Jul-12 8:40
professionalalleyes20-Jul-12 8:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.