How to handle Refresh and Reset in WPF application in MVP application - wpf

I am developing an windows UI application in WPF with MVP architecture with C#.
The application will interact to sqlserver and displays the data to the user.
I have 2 buttons REFRESH and RESET. which refreshes the page and resets the page to the home page respectively.
As I searched in few forums,navigationservice is recommeneded,but I couldnt see navigationservice.refresh() command
Refresh should refresh the page (current page) and the reset should reset to the homepage as per my appication.
Please help me in doing this.
Thanks
Ramm

You need to create custom commands for each of your buttons. The RefreshCommand can reload the data bound to your view, and you can use the ResetCommand to call the NavigationService to navigate to your home page.

Related

angularjs no effect in ascx page

I have web application with master page and content pages. Inside content aspx page I am trying to open a model popup user control ascx page using Ajax ModalPopupExtender.
Inside ascx user control trying to bind data from database using AngularJS.
Initially when I open the user control page, table/grid is not displaying any data.
Using Developer tools IE/Crome when I reload the page, next time it shows the data.
I think DOM is not getting updated in the first display, how can I solve this problem.
Thanks,
Ali

Remove back button Sencha Touch 2

I am using Sencha Touch 2 to build an application. I am initially loading the navigation view in the view port and then pushing the login view. After login it takes to the main page. Here I have a back button, which when clicked goes back to the login page. How can I prevent this? I googled a lot but could not find an effective answer. Any help would be greatly appreciated.
My first attempt would be to add the login view directly to the Ext.Viewport instead of pushing into the navigationView. Then, once the login process is completed, you have to destroy the login view so you can add the navigationView to the Viewport.
This way the login view wont be in the navigationView stack.
Hope it helps-

Silverlight Page Navigation with usercontrol and MVVM Light

I'm developing a silerlight application and have settled on the MVVM Light framework. One of the things I'm trying to do is create a "LoginStatus" control that can be used on multiple locations because we have different layouts that the pages are grouped into.
My challenge is how to redirect the page from a user control. When the users "logout" I want to redirect them to a different page not just a different View. Anybody have any thoughts or some examples that might do something like this.
Most of the examples I have seen out there just change the status on the current view.
dbl
If you really want to navigate to a new page - i.e. leaving the silverlight application - you can use the Navigate method of the System.Windows.Browser.HtmlWindow class (documentation).
System.Windows.Browser.HtmlPage.Window.Navigate(
new Uri("http://silverlight.net")
);
Otherwise, if you do not want to leave the silverlight application you simply navigate to a default view that informs the user that he is not logged in.
Edit:
For implementing a navigation service in Silverlight see for example this post or this post.

Silverlight and the back button

Is there a way to override the behavior of the back button in the browser when using a Silverlight app?
Essentially what I want to do is use the browser's back button to close dialogs in my application. The dialog covers the whole screen and the user would be inclined to think they are on a separate web page.
Look to the following links:
Prevent Browser Back Button for Silverlight with Confirm Dialog.
Silverlight - Prevent users from losing changes by using the browser back button
Managing Silverlight 3 navigation
behavior

Facebook Application/ Tab application session

I've got an application that exists primarily for use as a tab, with the canvas page acting as a control panel. When a user authorizes the tab for their page, Facebook redirects to the page url (e.g. http://www.facebook.com/pages/PAGE-NAME … nstalled=1) with the Wall visible, but I would like it to redirect to the canvas page (e.g. http://apps.facebook.com/APP-NAME/?fb_p … nstalled=1). My reason for this is that I need the fb_page_id so I can link the page installed to their saved settings on my end.
Is there some setting I need to change to enable it, or FBML to add to the tab? You can see a working model of this by installing an Involver tab (http://involver.com/), as the app will automatically redirect to the canvas page with both the fb_page_id and installed variables.
Thanks!

Resources