开发者

Endless loading screen in Siverlight 4

开发者 https://www.devze.com 2023-01-24 02:34 出处:网络
Upon Compiling and Running, when I try to load the page in either Google Chrome or Mozilla Firefox it just shows the blue progress thing rotating in circles, and for a split second it will show a perc

Upon Compiling and Running, when I try to load the page in either Google Chrome or Mozilla Firefox it just shows the blue progress thing rotating in circles, and for a split second it will show a percentage and then that disappears

Code for entire LoginPage

public partial class LoginPage : UserControl
    {
        public bool UsernameExists = false;
        public bool PasswordExists = false;
        public bool SchoolExists = false;
        public LoginPage()
        {
            InitializeComponent();
        }

        private void username_autocompletebox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            //Checks if user entered all neccessary values, enables Login_button if so
            if (username_autocompletebox.Text.Length != 0)
            {
                UsernameExists = true;
            }
            else
            {
                UsernameExists = false;
            }
            if (UsernameExists = true && PasswordExists == true && SchoolExists == true)
            {
                Login_button.IsEnabled = true;
            }
            else
            {
                Login_button.IsEnabled = false;
            }
        }

        private void password_passwordbox_PasswordChanged(object sender, RoutedEventArgs e)
        {
            //Checks if user entered all neccessary values, enables Login_button if so
            if (password_passwordbox.Password.Length != 0)
            {
                PasswordExists = true;
            }
            else
            {
                PasswordExists = false;
            }
            if (UsernameExists = true && PasswordExists == true && SchoolExists == true)
            {
                Login_button.IsEna开发者_JAVA技巧bled = true;
            }
            else
            {
                Login_button.IsEnabled = false;
            }
        }

        private void school_combobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            //Checks if user entered all neccessary values, enables Login_button if so
            if (school_combobox.SelectedItem != null && school_combobox.SelectedItem.ToString() != "Select a School")
            {
                SchoolExists = true;
            }
            else
            {
                SchoolExists = false;
            }
            if (UsernameExists = true && PasswordExists == true && SchoolExists == true)
            {
                Login_button.IsEnabled = true;
            }
            else
            {
                Login_button.IsEnabled = false;
            }
        }

        private void Login_button_Click(object sender, RoutedEventArgs e)
        {
            Authenticate Authenticator = new Authenticate();
            User CurrentUser = Authenticator.Login(username_autocompletebox.Text, password_passwordbox.Password, school_combobox.SelectedItem.ToString());
        }
    }


Most likely an unhandled exception being handled in Application_UnHandledException. Place a breakpoint at your Application_UnHandledException handler to see the problem, or in VS turn on the notification of unhandled exceptions when they are thrown. You could also locate the stacktrace in the browser to see the problem. This typically occurs when the XAML is incorrect somewhere. Referencing event handlers which may not exist, or styles, etc...

0

精彩评论

暂无评论...
验证码 换一张
取 消