Click here to Skip to main content
15,913,361 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: WPF Command Binding Problem Pin
SledgeHammer011-Aug-12 13:20
SledgeHammer011-Aug-12 13:20 
GeneralRe: WPF Command Binding Problem Pin
Pete O'Hanlon2-Aug-12 6:38
mvePete O'Hanlon2-Aug-12 6:38 
GeneralRe: WPF Command Binding Problem Pin
Pete O'Hanlon25-Jul-12 21:46
mvePete O'Hanlon25-Jul-12 21:46 
GeneralRe: WPF Command Binding Problem [UPDATE] Pin
Kevin Marois31-Jul-12 10:55
professionalKevin Marois31-Jul-12 10:55 
GeneralRe: WPF Command Binding Problem Pin
vinodkrebc26-Jul-12 8:40
vinodkrebc26-Jul-12 8:40 
QuestionInflating color value Pin
Prasoon Chaudhary25-Jul-12 1:59
Prasoon Chaudhary25-Jul-12 1:59 
AnswerRe: Inflating color value Pin
Tony Richards25-Jul-12 2:54
Tony Richards25-Jul-12 2:54 
GeneralRe: Inflating color value Pin
Prasoon Chaudhary25-Jul-12 23:21
Prasoon Chaudhary25-Jul-12 23:21 
AnswerRe: Inflating color value Pin
Christian Amado2-Aug-12 9:19
professionalChristian Amado2-Aug-12 9:19 
GeneralReg: Sending multiple objects from WCF service to silverlight Pin
Durga Charan Krishna Moorthy24-Jul-12 21:00
professionalDurga Charan Krishna Moorthy24-Jul-12 21:00 
GeneralRe: Reg: Sending multiple objects from WCF service to silverlight Pin
Abhinav S24-Jul-12 21:52
Abhinav S24-Jul-12 21:52 
QuestionAuthentication on DomainService Pin
Christian Amado24-Jul-12 11:31
professionalChristian Amado24-Jul-12 11:31 
Questiongetting color value of pixel from outside of WPF Mainwindow Pin
Prasoon Chaudhary24-Jul-12 1:24
Prasoon Chaudhary24-Jul-12 1:24 
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 

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.