okay so hiding the controls seems fairly straightforward - i came up with the following using the visibility.collapsed approach:
but still, ideally, a new page of it's own would be better - it also errors out when i hit the back button on the browser as well......Code:Private Sub invokeOperation_Completed(ByVal Sender As Object, ByVal E As EventArgs) If invokeop.Value = 1 Then 'navigate to the main page Label1.Visibility = System.Windows.Visibility.Collapsed Label2.Visibility = System.Windows.Visibility.Collapsed tbUserName.Visibility = System.Windows.Visibility.Collapsed pbPassword.Visibility = System.Windows.Visibility.Collapsed btnLogin.Visibility = System.Windows.Visibility.Collapsed Me.MainFrame.Navigate(New Uri("/Views/Dashboard.xaml", UriKind.Relative)) Else MessageBox.Show("Invalid credentials", "Try again", MessageBoxButton.OK) End If End Sub




Reply With Quote