[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Redraw A Window

Posted on 2013-11-11
4
Medium Priority
?
351 Views
Last Modified: 2013-11-12
C#, .Net 4, WPF

I have an application that has 2 windows and an App.XAML file. Window 1 is the main window that shows content from the App.XAML file. Window is a settings window that allows a user to modify settings in the App.XAML file.

When the user hits submit it saves the settings to the file then closes itself (Window 2). I want Window 1 to reload that file and then display it.

How can I do this?
0
Comment
Question by:LouisM1979
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 39641464
Can you show me the logic to show the 2nd window?
0
 

Author Comment

by:LouisM1979
ID: 39641496
@TheLearnedOne,

Sure thing. I am an old VB6 developer so my execution may not be the best c# in the world.

private void lblAdmin_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
      var newWindow = new ConfigurationSettings();
      newWindow.Show();
        }

Open in new window

0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 2000 total points
ID: 39641501
I would suggest that you use ShowDialog, so that you know when the window is closed, and then you can add some code after the ShowDialog call to perform the required step.  ShowDialog creates a modal window, instead of the non-modal window that Show creates.
0
 

Author Closing Comment

by:LouisM1979
ID: 39641677
Thank you for the information. Did some googling on ShowDialog and got to where I needed to be!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question