How do I detect that the Windows Mobile transitioned to continuum mode? - xaml

Is there a way to detect that Windows Mobile 10 transitioned into continuum mode?
The message-box on Windows Phone does not look anything like the one on Desktop and our designers want parity. I want to write our own version, but I only want it to work on Phone - I want the default one on desktop or when the app transitions to continuum on phone.
Any ideas?
I could not find anything on the web nor find any API that allows me to detect it.

I may be wrong but I don't think there is an API for Continuum. The idea of Continuum for Phone is that you're going from a fixed display size to something that is variable. The best way to detect this would be using the Visual State Triggers or checking if the size of the window has changed.
By also checking that the device family, AnalyticsInfo.VersionInfo.DeviceFamily, is Windows.Mobile, you'll know that you're using a phone device which is currently in the Continuum mode.

To detect if app is running in Continuum mode you'll need to check two things: DeviceFamily and UserInteractionMode.
public static bool IsInContinuum()
{
if (DeviceFamily() == DeviceFamilyType.Mobile && UIViewSettings.GetForCurrentView().UserInteractionMode == UserInteractionMode.Mouse)
return true;
else
return false;
}
Quote from this post:
"With Continuum, “touch” will always be returned when your app is on the mobile device, and “mouse” will always be returned when your app is on the connected display."
So you'll need to check if app runs in Continuum in SizeChanged event.

Due to MSDN Documentation Below,
There's no spesific trigger for Windows 10 Mobile continuum feature detection.
Continuum for Universal Apps
In order to find a solution on Mobile Apps, you can benefit from adaptive UI, you can check the app via screen resolution change Window.Current.SizeChanged, then you can combine with Device family AnalyticsInfo.VersionInfo.DeviceFamily to check if device is in Continuum mode.

Related

Worklight persistent busy indicator

I'm working on a project using IBM Worklight and any time I build and deploy my project on any simulator or device, I have this busy indicator spinner in the middle of the screen. Its always there, on every page and its there in the ios, windows, web and android simulators as well as one android device we've tested on. Has anyone seen this before and if so how would I get rid of it.
Jquery-mobile was the problem, it was continuously displaying the indicator for seemingly no good reason. Deleting Jquery mobile fixed the problem
I already used the native worklight loading.It is very good and I tested it on different platforms, devices. But it is necessary to close it when you leave the function that opened it.
Example:
var busyInd = new WL.BusyIndicator ("content", {text: "Please wait..."});
function consult(){
busyInd.show();
//impl
busyInd.hide();
}

Windows 8 application Resolution

I have developed Windows 8 application. and when I try to run it , to test it on another laptop ; the design got worst and everything appear in bad way.(Fonts, images, ..)
Is that related to the resolution ? If yes How I can solve it ?
How was your app developed? Is this a xaml/cs app or html/js app for windows 8 store apps? Is it in the store yet or only testing? Are multiple resolutions supported?
You'll want to test out various resolutions to see how your app handles them. Two links to test out here with your application:
Windows Store app Development Snack: Simulator tips & tricks
Scaling to different screensre
Another area to check is pixel density. Follow the guidelines for scaling to pixel density to ensure your app looks great when scaled.

Force WinRT app to snapped view

For one of my apps I'd like to send the app to snapped view after tapping a button. As far as I know there's no public API available to send a running application to snapped view. Did anyone find a workaround to do this?
Somehow it should be possible since you're able to do it in Windows 8 itself, and snap one of the running apps.
Update: Being able to trigger a Win+. might do the same trick, but the SendKeys API isn't available in WinRT either.
There is no way to force an application into snapped mode - it has to be a user initiated action.
An application can request to be unsnapped through:
Windows.UI.ViewManagement.ApplicationView.TryUnsnap();
Which tries to push the app into fill mode.
Windows 10 has a ApplicationView.TryResizeView method
So... to summarize the interesting WinRT journey:
Windows 8
Has a a 'Snapped' mode that a only a user can initiate. the developer can try to unsnap with the TryUnsnap method
Windows 8.1
Does not have Snapped mode, and TryUnsnap is deprecated. The dev can still listen for window size changes and know if the app view is in a smaller size as before.
Windows 10
Introduced the ApplicationView.TryResizeView method, where the dev can try to resize. Window size changed event is still there.
ApplicationView.GetForCurrentView().TryResizeView(new size(width, height)));

is there something like a hubtile (WP7) in win 8 metro style?

i want to port one of my windows phone 7 apps to the windows 8 metro style plattform.
the problem is, that i need a element like the hubtile which i use from the silverlight toolkit for windows phone.
is there something equal in the windows 8 metro style platform? maybe open source like the silverlight toolkit.
i dont want to add the livetile outside my app, this is easy. i want to have something like hubtile for WP7 for win8. This means a tile which is inside my application.
If I'm right I'm planning to do the same task. I didn't find any reference of a control which performs like a HubTile. Thus, I decided importing the one from the Silverlight Toolkit (for Windows Phone). Luckily it worked almost smoothly, you can see my sample at:
https://github.com/hmadrigal/playground-dotnet/tree/master/MsWinPhone.EmbedFont (tested on Windows 8 RP and Visual Studio 2012 RC)
Kind regards,
Herber
you can work with the live tiles of course and in several ways. You can use badge notifications, toast notifications, and so on.
I'll suggest you to take a look to this documentation.
And also take a look to those two samples: App tiles and badge sample and Push and periodic notifications client-side sample
By the way don't forget to enable the features you need in the package manifest.

Show an app's live tile in a grid Metro app

I was wondering if it's possible to show an app's live tile in my own MetroStyle app in Windows 8.
Short answer : no.
Longer answer : You can't show another app's live tile directly in your app, but you can probably put together something that looks and feels like a live tile. If the other app is another one of your apps, you can probably send your tile updates to the original app, and also provide the data to the host app (in which you want to show this tile). It shouldn't be too hard to do, and the Silverlight Toolkit for Windows Phone has a HubTile control that givers the basis of something similar for that platform.
If the app whose tile you want to access is not something you control, you won't be able to get any of the "live" data due to the heavily sandboxed nature of Metro apps.