private void CustomerView_OnLoaded(object sender, RoutedEventArgs e) { //debugMode(); labelWelcome.Content = "Welcome " + Session.User["NAMA"].ToString(); grid_Home.Margin = MarginPosition.Middle; grid_Cart.Margin = MarginPosition.Right; grid_Transactions.Margin = MarginPosition.Right; grid_Settings.Margin = MarginPosition.Right; transition = new Transition(FPS: transFPS); ComponentHelper.changeVisibilityComponent(grid_Home, Visibility.Visible); ComponentHelper.changeVisibilityComponent(grid_Cart, Visibility.Hidden); ComponentHelper.changeVisibilityComponent(grid_Transactions, Visibility.Hidden); ComponentHelper.changeVisibilityComponent(grid_Settings, Visibility.Hidden); //Init Customer View Model CustomerViewModel.initCustomerViewModel(this); CustomerViewModel.loadItems(); CustomerViewModel.loadCategory(spCategory); //Init Cart CartViewModel.initCart(this); CartViewModel.loadCartItem(); CartViewModel.initHargaCart(labelTotal, tbSubTotal); CartViewModel.initPaymentMethod(cbPaymentMethod); CartViewModel.initPromotion(cbPromotion, tbDiscount, tbErrorPromotion); CartViewModel.updateHarga(0, 0, 0); //Init Transaction Page TransactionViewModel.initTransaction(this); TransactionViewModel.initH_Trans(); //Init Settings Page SettingViewModel.init(this); IntPtr hwnd = new WindowInteropHelper(sender as Window).Handle; int value = GetWindowLong(hwnd, GWL_STYLE); SetWindowLong(hwnd, GWL_STYLE, value & ~WS_MAXIMIZEBOX); //COBA SESUATU :) }