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

WPF

 
QuestionDataTrigger bind to a Property Pin
mbv80023-Dec-12 17:01
mbv80023-Dec-12 17:01 
AnswerRe: DataTrigger bind to a Property Pin
Pete O'Hanlon23-Dec-12 19:17
mvePete O'Hanlon23-Dec-12 19:17 
AnswerRe: DataTrigger bind to a Property Pin
Wayne Gaylard23-Dec-12 19:39
professionalWayne Gaylard23-Dec-12 19:39 
QuestionWPF Adorner Issues Pin
#realJSOP17-Dec-12 10:52
professional#realJSOP17-Dec-12 10:52 
AnswerRe: WPF Adorner Issues Pin
SledgeHammer0118-Dec-12 4:49
SledgeHammer0118-Dec-12 4:49 
GeneralRe: WPF Adorner Issues Pin
#realJSOP20-Dec-12 9:09
professional#realJSOP20-Dec-12 9:09 
GeneralRe: WPF Adorner Issues Pin
SledgeHammer0121-Dec-12 4:50
SledgeHammer0121-Dec-12 4:50 
QuestionSilverlight Dynamic indexed binding Pin
Member 934221816-Dec-12 18:02
Member 934221816-Dec-12 18:02 
QuestionThird Party Controls Pin
Kevin Marois11-Dec-12 7:22
professionalKevin Marois11-Dec-12 7:22 
AnswerRe: Third Party Controls Pin
Mycroft Holmes11-Dec-12 12:06
professionalMycroft Holmes11-Dec-12 12:06 
AnswerRe: Third Party Controls Pin
Pete O'Hanlon11-Dec-12 12:43
mvePete O'Hanlon11-Dec-12 12:43 
GeneralRe: Third Party Controls Pin
Kevin Marois12-Dec-12 8:28
professionalKevin Marois12-Dec-12 8:28 
GeneralRe: Third Party Controls Pin
Pete O'Hanlon12-Dec-12 8:29
mvePete O'Hanlon12-Dec-12 8:29 
GeneralRe: Third Party Controls Pin
Kevin Marois12-Dec-12 8:30
professionalKevin Marois12-Dec-12 8:30 
GeneralRe: Third Party Controls Pin
Mycroft Holmes12-Dec-12 12:02
professionalMycroft Holmes12-Dec-12 12:02 
QuestionHow can I Bind a DataTemplate Slider definition to the Code behind? Pin
maycockt10-Dec-12 5:24
maycockt10-Dec-12 5:24 
AnswerRe: How can I Bind a DataTemplate Slider definition to the Code behind? Pin
Alisaunder10-Dec-12 13:52
Alisaunder10-Dec-12 13:52 
GeneralRe: How can I Bind a DataTemplate Slider definition to the Code behind? Pin
maycockt14-Dec-12 1:18
maycockt14-Dec-12 1:18 
QuestionHow does one define IOleServiceProvider in a C# WPF application? Pin
Xarzu10-Dec-12 3:54
Xarzu10-Dec-12 3:54 
AnswerRe: How does one define IOleServiceProvider in a C# WPF application? Pin
Pete O'Hanlon10-Dec-12 4:08
mvePete O'Hanlon10-Dec-12 4:08 
QuestionSetting icons based on Region/city name?! Pin
radkrish9-Dec-12 19:43
radkrish9-Dec-12 19:43 
AnswerRe: Setting icons based on Region/city name?! Pin
Abhinav S9-Dec-12 20:12
Abhinav S9-Dec-12 20:12 
QuestionWPF ComboBox Selected Item Problem Pin
Kevin Marois8-Dec-12 10:48
professionalKevin Marois8-Dec-12 10:48 
I have a combo box of lookup items. It's bound to an ObservableCollection of LookupEntity. The code-behind:

private ObservableCollection<LookupEntity> _EmployeeTypes;
public ObservableCollection<LookupEntity> EmployeeTypes
{
    get { return _EmployeeTypes; }
    set
    {
        if (_EmployeeTypes != value)
        {
            _EmployeeTypes = value;
            RaisePropertyChanged("EmployeeTypes");
        }
    }
}

private LookupEntity _SelectedEmployeeType;
public LookupEntity SelectedEmployeeType
{
    get { return _SelectedEmployeeType; }
    set
    {
        if (_SelectedEmployeeType != value)
        {
            _SelectedEmployeeType = value;
            RaisePropertyChanged("SelectedEmployeeType");
        }
    }
}


and

public override void RefreshView()
{
    ViewHeaderText = "Employee - " + employee.FullName;

    FirstName = employee.FirstName;
    LastName = employee.LastName;

    SelectedEmployeeType = employee.EmployeeType;  // When I get here, all is OK. property is being set
}


the XAML

<ComboBox Grid.Row="2"
            Grid.Column="1"
            Width="120"
            HorizontalAlignment="Left"
            ItemsSource="{Binding EmployeeTypes}"
            SelectedItem="{Binding SelectedEmployeeType, Mode=TwoWay}">
                
    <ComboBox.ItemTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding Caption}">
                <TextBlock.ToolTip>
                    <StackPanel Orientation="Vertical">
                        <TextBlock Text="{Binding Caption}"
                                    FontWeight="Bold"/>
                        <TextBlock Text="{Binding Description}"/>
                    </StackPanel>
                </TextBlock.ToolTip>
            </TextBlock>
        </DataTemplate>
    </ComboBox.ItemTemplate>
                
</ComboBox>


The combo item is not being selected. Anyone see what's wrong?
If it's not broken, fix it until it is

AnswerRe: WPF ComboBox Selected Item Problem Pin
Ninja__Turtle8-Dec-12 17:43
Ninja__Turtle8-Dec-12 17:43 
AnswerRe: WPF ComboBox Selected Item Problem Pin
Wayne Gaylard8-Dec-12 18:24
professionalWayne Gaylard8-Dec-12 18:24 

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.