Click here to Skip to main content
15,884,099 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: WPF Design-Time Headaches Pin
Jason Gleim10-Feb-14 10:34
professionalJason Gleim10-Feb-14 10:34 
GeneralRe: WPF Design-Time Headaches Pin
GenJerDan10-Feb-14 11:10
GenJerDan10-Feb-14 11:10 
GeneralRe: WPF Design-Time Headaches Pin
SledgeHammer0110-Feb-14 12:04
SledgeHammer0110-Feb-14 12:04 
GeneralRe: WPF Design-Time Headaches Pin
GenJerDan11-Feb-14 5:20
GenJerDan11-Feb-14 5:20 
QuestionHitTest Problem Pin
Kevin Marois10-Feb-14 8:18
professionalKevin Marois10-Feb-14 8:18 
AnswerRe: HitTest Problem Pin
Jason Gleim10-Feb-14 9:41
professionalJason Gleim10-Feb-14 9:41 
QuestionLinq-To-SQL DBML Designer Question Pin
Kevin Marois10-Feb-14 7:11
professionalKevin Marois10-Feb-14 7:11 
QuestionMVVM Bound Radio Button Unexpected Behavior Pin
eddieangel7-Feb-14 12:08
eddieangel7-Feb-14 12:08 
I have a boolean value to which radio buttons are bound, like so:

XML
<RadioButton x:Name="Aye"
                             GroupName="wah"
                             IsChecked="{Binding IsChecked}">
                    <TextBlock>Yes</TextBlock>
                </RadioButton>
                <RadioButton x:Name="Nae"
                             GroupName="wah"
                             IsChecked="{Binding IsChecked,
                                                 Converter={StaticResource boolInv}}">
                    <TextBlock>No</TextBlock>
                </RadioButton>


In VM property looks like this:

C#
private bool isChecked;
public bool IsChecked
{
    get { return isChecked; }
    set
    {
        if (isChecked!= value)
        {
            isChecked = value;
            OnPropertyChanged("IsChecked");
        }
    }
}


If the bound value is true, when I first open the screen the Yes checkbox is checked. I can select yes or no and they will display and save correctly. However, if I open the screen with a no value, nothing is checked. I believe the problem lies in the fact that when IsChecked is false, the converter converts that value to true in order to display the No box as checked, but in doing so it sets the IsChecked property to true, which then means that the No button should not be checked. The converter is the standard bool inverter all over the internet.

I didnae write this code, just trying to debug it.

Cheers, --EA
AnswerRe: MVVM Bound Radio Button Unexpected Behavior Pin
Richard Deeming10-Feb-14 2:10
mveRichard Deeming10-Feb-14 2:10 
QuestionHow to get entire column values of a datagrid when datagrid column header check box is checked and bind those values to a datatable? Pin
abhinav12235-Feb-14 18:28
abhinav12235-Feb-14 18:28 
QuestionHwndHost & C++/CLI problem Pin
Super Lloyd4-Feb-14 3:09
Super Lloyd4-Feb-14 3:09 
QuestionXML Treeview NodeChanged event not triggering on attribute edit Pin
wilx2-Feb-14 22:49
wilx2-Feb-14 22:49 
AnswerRe: XML Treeview NodeChanged event not triggering on attribute edit Pin
wilx2-Feb-14 23:09
wilx2-Feb-14 23:09 
QuestionAnother real newbie question - wiring events to handlers not in the code-behind class Pin
Marc Clifton2-Feb-14 10:57
mvaMarc Clifton2-Feb-14 10:57 
AnswerRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
Pete O'Hanlon2-Feb-14 11:27
mvePete O'Hanlon2-Feb-14 11:27 
GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
Marc Clifton5-Feb-14 15:09
mvaMarc Clifton5-Feb-14 15:09 
GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
Pete O'Hanlon5-Feb-14 23:15
mvePete O'Hanlon5-Feb-14 23:15 
AnswerRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
_Maxxx_2-Feb-14 19:19
professional_Maxxx_2-Feb-14 19:19 
GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
Mycroft Holmes3-Feb-14 3:05
professionalMycroft Holmes3-Feb-14 3:05 
GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
_Maxxx_3-Feb-14 9:29
professional_Maxxx_3-Feb-14 9:29 
GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
Marc Clifton5-Feb-14 15:13
mvaMarc Clifton5-Feb-14 15:13 
GeneralRe: Another real newbie question - wiring events to handlers not in the code-behind class Pin
_Maxxx_5-Feb-14 15:26
professional_Maxxx_5-Feb-14 15:26 
QuestionHow do I wire Command to functions not in the view? Pin
Marc Clifton2-Feb-14 10:14
mvaMarc Clifton2-Feb-14 10:14 
QuestionHow to bind a dataset to a WPF richtextbox? Pin
fsunole0329-Jan-14 10:43
fsunole0329-Jan-14 10:43 
AnswerRe: How to bind a dataset to a WPF richtextbox? Pin
Wayne Gaylard30-Jan-14 1:07
professionalWayne Gaylard30-Jan-14 1:07 

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.