WP8 Clear navigation history on WebBrowser control - windows-phone-8

I am developing an app in Windows Phone 8, and I have a XAML page with a WebBrowser control to load some sites. When I load a new site, I need to delete the browsing history so far. How can I do that with c#?
myBrowser.Navigate(new Uri("http://www.google.com"));
...
myBrowser.Navigate(new Uri("http://www.yahoo.com"));
myBrowser.ClearCookiesAsync();
myBrowser.ClearInternetCacheAsync();
myBrowser.CanGoBack(); //returns true
Regards

Related

I can't connect between pages in windows phone 8.1?

I'm a newbie about windows phone, this is my first project, a app calculate calories when running in wp8.1 RT, but I have a problem, basically I have 3 pages, mainpage is page 1, how must I do whenever I click a button in page 1 (start running), a stopwatch in page 3 starts counting and start receiving data gps of Map in page 2 (distance,speed) automatically, ie I'm still in page 1, the other pages run in background if i don't navigate to them ? ( I implemented stopwatch and map in project), forgive me because I'm not good at English.
In a Windows Phone App (does not matter if is silverlight or RT) you just can run a page at time.
Instead use several pages, you can use Background task or Geofencing.
I hope it helps you.

How to clear webbrowser memory in windows phone 8 programmatically in pivot control

I want to clear the memory of web browser page by page on forward and backward navigation in pivot control .I'm beginner for this platform please help me.Is it posiible?

Where can I get Rating Page of Windows Phone

I would like to use same design in my app as has default rating/review page in Windows Phone 8 - (Page which appears when user wants to review an app). Where can I get the screen shot of this page? Or is there aviable original template for this page?
You can take the screenshot on your phone and copy it to your computer. There is no template for that page that is publicly available, why would you need it?
If you want to enable rating your app from the phone itself, use MarketplaceReviewTask.
If you want to reuse the star rating control, you can get it from the Windows Phone Toolkit: see RatingControl.

Disable everything else on windows phone tablet

TL;DR;
How do I disable everything on windows phone that a user can use to "get out of my app"
Long version
I'm developing a app for a table running windows phone. This tablet will be available to general public so they can choose which kind of service they want (like "open new account", "talk to the manager" and so on). Because of that I would like to disable everything on the tablet (home button, close button...) so a miss guided user wont be able to close my app.
How do I do that? (Of course I intend to provide a "Close app" button that will require a password of some kind...)
There's no way you can do what you want with Windows Phone. There is no ability to, in software, block access to the start or search buttons.
As indicated in other answers, you can override the back button but if you prevented the app from going to the home screen you would be unable to get the application certified (you could still sideload to the device, or distribute through the company store).
You may be better served considering an RT device (with Windows 8.1 in KIOSK mode) or Windows 8 Embedded Handheld (which is based on Windows Phone 8).
It is possible to change the behavior of the back button by doing the following.
Place this in your phone:PhoneApplicationPage tag ie the header of the page.
XAML
BackKeyPress="PhoneApplicationPage_BackKeyPress"
In the code behind.
C#
private void PhoneApplicationPage_BackKeyPress(object sender, CancelEventArgs e)
{
e.Cancel = true;
}
However it is not possible to capture the home key pressed and search key pressed events. You could try messing with the "Application_Deactivated" method in the App.xaml.cs so that when the application is deactivated...it is not? That could get messy and I've never done it before. Just an idea. Good luck.

Chrome app navigate htmls without creating windows

I'm creating a chrome packaged app, and I need to navigate my htmls without creating a lot of windows, like, if the user click one button, it opens the html in the same window the user are.
Is it even possible? If not, is there a way to make windows modal? So the user can't focus another window without closing the current?
Packaged apps intentionally do not support navigation. Apps are not in a browser, there is no concept of forward, back, or reload. Applications which do require the concept of navigation, or modal dialogs, should use a user interface framework that supports that functionality. In fundamentals, you can navigate by manipulating the DOM or by using CSS to animate and control visibility of components of your app.
The page you want to navigate to can be opened in a new window, then the previous page can be closed.
function navigateToLink (link) {
var current = chrome.app.window.current();
chrome.app.window.create(link);
current.close();
}