Change LiveTile on Windows 8 app while running - c#

I want to change the LiveTile of my Windows 8 app while it is runnig. So the user can configure something in the app and then I want to display a local stores image as LiveTile.
How can I realize this scenario?

Here is a blog post with code samples on how I implemented live tiles, with links to other resources that helped me: http://blogs.msdn.com/b/jennifer/archive/2012/11/20/real-world-live-tiles-working-with-live-tiles-in-windows-8-apps.aspx

You use The TileUpdater.update method, see http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.notifications.tileupdater.update.aspx. Examples of this are in the App Tiles and badge sample, scenarios 2 and 3 (for images). You can find the sample at http://code.msdn.microsoft.com/windowsapps/App-tiles-and-badges-sample-5fc49148#content.

Related

How do I create custom Widget for my c# app

How do I create custom widget for my c# application.
Example :
I wrote an app that shows in Windows 10 menu just like other apps (example firefox) -
screen
How can I create custom "widget"? To show on my app with some from current state of application.
This application is running on user PC all the time, each hour it refresh some informations and I want them to display on this "widget".
How can I achieve this?
The icons on the Windows start screen are known as "Tiles". The tiles that are dynamic are known as "Live Tiles". I share your frustration about not knowing what to search for in the search engines when you don't know what the correct terminology is.
Although I have never created a Live Tile, I did find this site:
https://msdn.microsoft.com/en-us/magazine/dn857365.aspx
which discusses Live Tiles and has some sample code, which might point you in the right direction.
It doesn't look like a complete solution for what you are looking for, but it should give you enough background to know what to search for.

Change app root frame in Windows Phone 8.1 Silverlight application

I have two simple questions since I'm very new to Windows Phone programming:
1:
How do I cange the root frame, or show a different Page on startup, in a Windows Phone 8.1 Silverlight application? I have a LoginPage and then I want to check if the user is logged in show MainPage as root frame and if the user is not logged in show the LoginPage.
2:
Windows Phone Silverlight applications seems so different to me compared to the Windows Phone WinRT applications, or maybe I'm just not experienced enough. For example I can't put a placeholder/hint text in a textBox in Silverlight but it's super easy in WinRT, why is it like that? Isn't that something very basic that many IDE's implements? Or have I missed something mayor when I'm developing a Silverlight application for Windows Phone?
I know that Windows Phone WinRT is used to create universal apps and Silverlight is used to create only mobile apps for Windows Phone, but why is developing a mobile app in Silverlight so much different (at least to me) compared to build a Windows Phone app i WinRT?
For your first question, use the UriMapper.
The basic principle is that you check if the user is logged in or not and based on that, navigate to the correct view.
The code is not all that complicated, there is a very good tutorial up on Shawn Kendrot his blog here...
For question 2, how to add some sort of hint/watermark can be done in several different ways.
But a very simple version is presented on MSDN here... it uses events to set and clear the watermark.
Point 1
You have to go to Package.appxmanifest and under the tab called Application the second field contains the startup page name. Currently it should be MainPage.xaml, just change it to LoginPage.xaml.
Point 2
I don't quite understand your question. Silverlight and Windows Runtime are two different platforms, they have in fact many different libraries. The goal of Windows Runtime is to run the same application on several different devices, so different hardware requirements and different resolutions. It was a need to organize the environment differently and of course Microsoft added some minor changes such as the hint text (e.g.).
What is so different to you? I did the porting of an app from SL to WinRT but it's not difficult nor tricky at all.

Windows Phone tiles in app

I am working on a Windows Phone 8 app, and have a question about UI design. Please take a look at the image below:
What I am trying to add to my app is something like the above UI under "recent" tab. That is, some kind of live tile style thing with-in the app.
If anyone has experience about how to build such kind of in-app tiles, please share some idea or code sample.
Thank you
The Windows Phone Toolkit provides a Windows Phone HubTile control:
Here is a tutorial on the Nokia Wiki that explains how to use it.
Use HubTile control from Windows Phone Toolkit library.
There are couple tutorials about that control available, e.g.
http://igrali.com/2011/08/19/how-to-use-the-hubtile-control/,
http://www.developer.nokia.com/Community/Wiki/HubTile_in_Windows_Phone

Check if phone is in call (WP7)

In windows phone 7 ... Is there is a way to check if the phone is now busy with a call as in android
if yes, what is the name space that serve this?
As others have commented there is currently no API within the Windows Phone SDK to detect whether a call is in progress.
Tim Askins wrote a fairly detailed post on his attempts to get around this but ultimately it just isn't possible.

Is there a way to open the Bing Maps App on Windows Phone 7 to a specific location?

The built-in emulator from the WP7 Tools doesn't have the Bing App installed, and I don't have any phone hardware to test with. So I'm simply wondering, how can I open the Bing Maps Application to a specific Lat/Long?
Related Questions:
iPhone -- How can I launch the Google Maps iPhone application from within my own native application?
Android -- https://developer.android.com/guide/appendix/g-app-intents.html
It seems that starting from the OS version 7.1 there's a specific task available for this, see BingMapsTask and for directions the BingMapsDirectionsTask.
Unfortunately there is no way to launch the Bing Maps App from within your own application.
In an early CTP there was a way but this has been removed. Hopefully it will return in the future but it is not on any current, public, roadmaps.
This leaves two alternatives.
Option 1
You could perform a search for the lat/long you want to show. The search app does directly integrate with the bing maps app so, assuming that bing can take the lat/long you provide and return something useful, the user would still be able to do whatever they wished within the bing maps app.
This has 2 downsides though. Firstly, you have no control over the search results. And, secondly, you cannot test this on the emulator.
Option 2
You could use the BingMaps control within your own silverlight application.
(Prior to the RTM, it was posible to use the full Silverlight version of the control within your app. But, this had a few quirks and was only ever intended as a stop gap solution.)
While not as fully featured as the app, the control does offer a lot of functionality.
Without a real device, but you could simulate location data, for testing, with the Reactive Extensions.
Even with a real device you will probably want to look at doing this as it's a lot easier than trying to debug while walking or driving around.
Edit:
As per this post by Kevin Marshall, if you're going to use the WebBrowserTask() (option 1 above) prefix your query with "maps:" and URL encode your query string. eg:
var task = new WebBrowserTask();
task.URL = "maps:1%20N%20Franklin%2060606";
or
task.URL = "maps:37.788153%2C-122.440162";
Bing maps silverlight control is now supported out of the box and is part of the tools... learn more about it here: http://channel9.msdn.com/Learn/Courses/WP7TrainingKit/WP7Silverlight/UsingBingMapsLab/Exercise-1-Introduction-to-the-Bing-Map-Control
Yes you can do this. I've got it running in the emulator (however, as many people have said there's no guarantee the Bing Maps for Silverlight control will run on the actual device)
Here is the xaml:
<m:Map Grid.Row="0" x:Name="mapMain" ZoomLevel="5" Mode="AerialWithLabels" CredentialsProvider="YOURBINGMAPSLICENSE" />
and here's some code to set the location in the .cs class
var ppLoc = new Location(-37.821285, 144.97785);
mapMain.SetView(ppLoc, 17);

Categories

Resources