Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4028840
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:16:13+00:00 2026-05-20T11:16:13+00:00

I have a WPF-page (ZorgTrajectPage1.xaml) with a code-behind ZorgTrajectPage1.xaml.cs with a DependencyProperty ZorgtrajectController called

  • 0

I have a WPF-page (ZorgTrajectPage1.xaml) with a code-behind ZorgTrajectPage1.xaml.cs with a DependencyProperty ZorgtrajectController called Ztc.

The dataContext is set in the Page_Loaded() of ZorgTrajectPage1.xaml:

Ztc = new ZorgTrajectController();
DataContext = Ztc;

It appears that I can access this ZorgTrajectController via binding to look up a integer in this Controller (patientID-variable):

<TextBox Name="textBox1" Text="{Binding Path=PatientID, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" />

This works perfect. But I also have a comboBox that selects an educatiePakket. When this selection is made, the selectedEducatiePakket is looked up via a LINQ-query and put in a variable in a ZorgTrajectController. This SelectedEducatiePakket is a new instance of a LINQ-class (that has a String-property with it’s name, called naam). I used the following method to fill it up:

SelectedEducatiepakket = SelectedEducatiePakketByID(5);

public educatiepakket SelectedEducatiePakketByID(int id)
        {
            educatiepakket ep = (from o in db.educatiepakkets
                                 where o.educatiepakket_id == id
                                 select o).Single() as educatiepakket;
            return ep;
        }

Tthe following:

<TextBox Name="EPNaamTxtbx" Text="{Binding Path=SelectedEducatiepakket.naam, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" />

doesn’t work. I totally don’t understand why this isn’t working. I’ve made a button which in the code-behind Console.WriteLines information of the Ztc. It says there is a selectedEducatiePakket, but my textbox isn’t showing any information of it.

Does anyone know what I’m doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T11:16:14+00:00Added an answer on May 20, 2026 at 11:16 am

    Make sure that ZorgTrajectController implements INotifyPropertyChanged and fires the PropertyChanged event in the setter of the SelectedEducatiePakket property. Something like this:

    public educatiepakket SelectedEducatiePakket 
    {
       get { return _selectedEducatiePakket; }
       set 
       {
          _selectedEducatiePakket = value;
          RaisePropertyChanged("SelectedEducatiePakket");
       }
    }
    

    If that doesn’t help, run your project under debugger and after the property SelectedEducatiePakket is supposed to be set look in the Visual Studio’s Output window. There might be some information about binding errors.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WPF app which snaps to screen edges (I just set the
I have a WPF page that contains a Listbox and a frame. The frame
I have a WPF page that has 2 ContentControls on it. Both of the
I have a WPF page with validation rules. This page has 2 grids -
I have a WebBrowser object in a WPF Page and I'm trying to do
In a WPF page that I'm designing for my church, I have two ListBox
I have a list of object bound to a DataGrid in a WPF page
I have WPF ListBox which is bound to a ObservableCollection, when the collection changes,
I have a WPF project and I'm trying to setup a NAnt build script
I have a WPF application in VS 2008 with some web service references. For

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.