Page 1 of 1

[SOLVED] Error on ChildWindow

Posted: Sat Nov 24, 2018 11:23 am
by Nick
see sample attached,

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace Application16
{
public partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
this.GotFocus += MainPage_GotFocus; // :!: dosent work!
// Enter construction logic here...
Login(); // :!: dosent work!
// Login(); work only from button click { private void Button_Click(object sender, RoutedEventArgs e)}
}

private void MainPage_GotFocus(object sender, RoutedEventArgs e)
{
Login();
}

private void Login()
{
ChildWindow cw = new ChildWindow();
cw.Content = "login form !!";
cw.ShowAndWait();
}

private void Button_Click(object sender, RoutedEventArgs e)
{
Login();
}
}
}

Re: Error on ChildWindow

Posted: Tue Nov 27, 2018 12:39 am
by JS-Support @Userware
Thanks. We are going to fix this issue asap. In the meantime, a workaround is to register the "Loaded" event of the Page and put the code there.

Re: Error on ChildWindow

Posted: Fri Dec 07, 2018 8:37 am
by JS-Support @Userware
The issue has been fixed. This fix will be included in the next build. Thanks.