Skip to content

Conversation

AndrewKeepCoding
Copy link
Contributor

Description

This PR updates WindowHelper.CreateWindow() to return a plain Window instead of MainWindow, which was tightly coupled to several static members.

Motivation and Context

Fixes #2062.

How Has This Been Tested?

Manually tested.

Screenshots (if appropriate):

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

private void createNewWindow_Click(object sender, RoutedEventArgs e)
{
var newWindow = new MainWindow();
var newWindow = new Window
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading this was painful 😅, can't we just create a NewWindow or SecondaryWindow?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My intension was to avoid adding custom code to the sample as much as possible, but sure I can do that.🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Child window sample forces parent window navigation

2 participants