Windows Phone 8 Webbrowser (zoom) - c#

I'm creating a Windows Phone 8 app, but I'm stuck at the last part...
It's an app to view the calendars on school: see calendar
Now I open the link of every class (I have the changes for every class, but it opens small... What can I do to solve this ? (See picture) + I can't acces the website codes.
See the picture:
I only want the calendar of the website and not the rest at the left side.

private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
webBrowser1.Document.Body.Style = "zoom:300%;";
}
assuming webBrowser1 is the name of your control

Related

Windows phone 8.1 BackButton Navigation issue

I am developing Windows phone 8.1 Silver Light Application. In the application there are so many screens. Pages are navigating perfectly.
My issue is when i press on back button(Windows Phone Back Button) The pages are going back to the previous pages. I want to stop back button navigation in my application. I followed below link but i am not succeeded.
https://social.msdn.microsoft.com/Forums/windowsapps/en-us/131a99ce-53a4-4389-81e9-7801af57b78b/used-hardwarebuttonsbackpressed-handler
Could any one advise me.
Try this for back button on your XAML.cs page :
protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
{
base.OnBackKeyPress(e);
if (NavigationService.CanGoBack)
{
while (NavigationService.RemoveBackEntry() != null)
{
NavigationService.RemoveBackEntry();
}
}
}

Windows Phone 8.1 open link in other app

I have a program which can show some links (music/video/ etc....).
I want when Clicked on download button, my app send that link to UC Downloader for download. I can open link with Internet Explorer but I want open in UC Downloader.
You can launch an app from your code if you know. From the msdn :
By using the association launching API, your app can automatically launch another app by launching a custom URI. To do this, use the Launcher.LaunchUriAsync(Uri) method from the Launcher object of the Windows.System namespace. For example, the following code launches a fictitious Contoso app to display new products.
Example :
private async void LaunchContosoNewProductsButton_Click(object sender, RoutedEventArgs rea)
{
// Launch URI.
Windows.System.Launcher.LaunchUriAsync(new System.Uri("contoso:NewProducts"));
}
You can find a tutorial here.
Here's how.
Windows.System.Launcher.LaunchUriAsync(new Uri("uc-url:http://www.microsoft.com"));
private async void Button_Click(object sender, RoutedEventArgs e)
{
string uriToLaunch = #"http://www.bing.com";
var uri = new Uri(uriToLaunch);
var success = await Windows.System.Launcher.LaunchUriAsync(uri);
}
In windows phone 8.1

ShareStatusTask doubles Status on WP8.1 Facebook share

I have a simple C# WP8.0 application from where I launch, on a button click, the ShareStatusTask.
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
{
var task = new ShareStatusTask { Status = "Test message", };
task.Show();
}
When I choose to share on Facebook, Messaging, OneNote etc everything works fine on a WP8 device.
The same application running on a WP8.1 device doubles the Status text only on Facebook share.
I would like to have same behavior as on WP8. What am I missing here?
I ended up using ShareLinkTask instead of ShareStatusTask. Lucky me I needed anyway to add a link to the message.

WP8 - Automatically open keyboard on &123 option

while developing a new Windows Phone 8 software, I got stuck with this issue.
I'd need to open the keyboard straight to this view:
But all I can do is this (just giving focus to a text-box, that's easy enough!):
Set the TextBox InputScope properties to Digits in your xaml code
<TextBox InputScope="Digits " Name="txtNumbers" />
and your code behind page use below line of code
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
txtNumbers.Focus();
}
Check this link for allowed scopes:
http://msdn.microsoft.com/en-us/library/system.windows.input.inputscopenamevalue%28VS.96%29.aspx
I believe the view you are after is called "Numeric Mode"; This following link has some images as well.
http://www.informit.com/articles/article.aspx?p=1706099&seqNum=2

Facebook Like button doesn't work in GeckoFX browser

I wanted to implement the Facebook Like button into my C# application using the Web Browser control but i encountred a problem with Internet Explorer (After clicking on like button, the facebook login popup appears) but iexplore block and ask me whether to recover the page.
Therfore, i downloaded geckoFx to embed Mozilla on my application instead of the in built Web Browser control ! But now when i click on the Like button on the Gecko browser, i get a blank page. And when i right click the page to view the source i don't see anything (blank page)
Maybe the problem is either the GeckoFX browser doesn't support Popups or doesn't support Javascript
How to implement Facebook Like Button inside GeckoFX browser in C# Windows Forms ?
I'm using XUL runner 1.9.1.19
New Windows and tabs are not handled automatically. You need to create events for those:
private void webBrowser_CreateWindow(object sender, GeckoCreateWindowEventArgs e) {
e.WebBrowser = NewWindow();
}
private void webBrowser_CreateTab(object sender, GeckoCreateTabEventArgs e) {
e.WebBrowser = NewWindow();
}
private GeckoWebBrowser NewWindow() {
BrowserForm frm = new BrowserForm();
frm.Show();
return frm.WebBrowser;
}
Here BrowserForm must contain a public property that points to the GeckoWebBrowser control.

Categories