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

  • SEARCH
  • Home
  • 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 4017002
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:48:30+00:00 2026-05-20T09:48:30+00:00

I have a WPF-application with a mainwindow and different pages. On one of the

  • 0

I have a WPF-application with a mainwindow and different pages. On one of the pages (OverzichtPage) I have a textBox bound to a DataController (Data). (which is a dependencyProperty on the codebehind of the page) (Might be worth mentioning: the DataController is a Singleton, so that patient is supposed to stay the same and can’t disapear..)

public static DependencyProperty data = DependencyProperty.Register("Data", typeof(DataController), typeof(OverzichtPage));
    public DataController Data
    {
        get { return (DataController)GetValue(data); }
        set { SetValue(data, value); }
    }


<TextBox Name="naamPatientTxtBox" Text="{Binding Path=Data.Patient.naam, Mode=TwoWay}" DataContext="{Binding ElementName=OP}" />

At first sight, this binding seems to work. When I navigate to another page by clicking a button

<Button Content="Meer info/ Wijzigen" Click="MeerInfoWijzigenBtn_Click" />

private void MeerInfoWijzigenBtn_Click(object sender, RoutedEventArgs e)
    {
        Uri pageFunctionUri = new Uri("View/ZorgTrajectPage1.xaml", UriKind.Relative);
        NavigationService.Navigate(pageFunctionUri);
    }

and navigate back, the binding suddenly stops working. I found out after the navigating back, the naamPatientTxtBox.GetBindingExpression(TextBox.TextProperty).ParentBinding; is empty. Does anyone have a clue why this binding suddenly disapears after the navigating? I really don’t understand how this is possible.

  • 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-20T09:48:31+00:00Added an answer on May 20, 2026 at 9:48 am

    Have you tried setting the KeepAlive property of the page to true?
    You might be running into history/caching problems. State isn’t autmatically kept.

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

Sidebar

Related Questions

I have an WPF-Application with 3 different UserControls in the MainWindow and only one
I'm working on a WPF application in which I have a MainWindow of type
Guys, I have a basic WPF application. Contains App.xaml as always and a Mainwindow.xaml.
I have WPF Application where I have One main form and other user controls
I have a WPF application which connects to a remote database over internet and
I have an application in which I will have to get at another WPF
I have a WPF application with a GUI on the MainWindow. I want to
I created a wpf application which have a single window which is getting started
I have encountered something very strange, simple WPF application <Window x:Class=ListBoxSelection.MainWindow xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml Title=MainWindow
I have the following binding in my wpf application xaml: <TextBox Text={Binding Amount, StringFormat=c}

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.