windows-phone

Windows Phone 8 API for Headset control events [closed]

有些话、适合烂在心里 提交于 2019-12-24 08:39:45
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Is there an API for Windows Phone 8 which allows to receive headset events, such as when a user presses the play/stop button? I would be interested in these events to react in my application accordingly. Regards, 回答1: If you are in control of the audio/video on the device at this point (via MediaElement or

Overriding methods from Library Project

天大地大妈咪最大 提交于 2019-12-24 08:37:03
问题 I am working on Windows Phone 8 application. I have a Windows Phone Class Library project(Called Base) and Windows Phone App(called child). In my Base project i have a class which has methods and static variables. Eg: Class Settings { public static string AppName = "Base"; public virtual List<String> TabDetails() { List<String> TabDetails = new List<string>(); helpTabDetails.Add("AAA"); helpTabDetails.Add("BBB"); return helpTabDetails; } } Now in my child app i am just linking this class (by

Windows Phone 7: How to notify data is updated in ListBox?

Deadly 提交于 2019-12-24 07:41:19
问题 I have above scenario: If user click on ListBox, it will either have sub items (again ListBox) or detail view. So what i did currently is: Whenever user clicks any item, made a web call and filled up the same ListBox if clicked item is having further sub items. Now, issue comes in picture: Suppose i am in 4th screen (detail view), Moved to the 3rd and 2nd screen with data maintained as stack (Its working fine, yes i am maintaining data in ObservableCollection<ObservableCollection<MyObjects>>

windows phone map control show all locations (zoom to include all pushpins)

百般思念 提交于 2019-12-24 07:15:34
问题 I've tried using map.SetView(LocationRect.CreateLocationRect(locations)); But the thing is I need the all the pushpins to be shown as well. Using the above method only takes the location into account. Some pushpins gets cropped especially corner ones. Is there a better way to do this? Thanks. 回答1: LocationRect.CreateLocationRect(locations) gives you the binding box of the locations, so you could artificially inflate that a little (for example, by adding/subtracting a tenth of a degree from

How to detect different Windows target platforms?

。_饼干妹妹 提交于 2019-12-24 07:07:19
问题 I would like to create a common header file for my C/C++ files. In that header file I would like to have compile-time detection of which platform I'm building for and what type of application I'm building for that platform. The options are: Desktop App. OS: Win 7 / Win 8.x. CPU: Intel/AMD. Device: PC/Laptop Windows Phone App. OS: Windows: 8.x. CPU: ARM. Device: Windows Mobile Phone Desktop App. OS: Windows 8.x. CPU: Intel. Device: Tablet Store App. OS: Windows 8.x. CPU: Intel. Device: Tablet

Detecting Orientation of Windows Phone

冷暖自知 提交于 2019-12-24 05:13:17
问题 I'm using the JavaScript event onorientationchange and the parameter window.orientation to detect orientation changes and orientation values on my website. This works well with an iPhone and an Android. But a Windows Phone doesn't fire the onorientationchange event and window.orientation is undefined. How I detect orientation changes of Windows Phones? Thanks, Konrad 回答1: IE9Mobile doesn't support these events. If your page is being displayed inside a WebBrowser control within a (silverlight)

The application called an interface that was marshalled for a different thread when using MVVM light messenger

泄露秘密 提交于 2019-12-24 04:10:06
问题 I have a public timer and in its Tick event I send a message to my ViewModel. I start the timer from a button somewhere in my application. The problem is there is an exception when the ViewModel tries to register (using MVVM Light): "The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD))" Here is the timer public static class SomeManager { private static Timer gAppTimer; private static object lockObject = new

Windows Phone 8 detect screen unlock

谁说胖子不能爱 提交于 2019-12-24 03:44:18
问题 My WP8 app is set to run underneath the lock screen because it needs to continue to run even while the screen is locked, but I want to be able to detect when the user unlocks their screen, how do I do this? What methods, if any, are called when the phone is unlocked? 回答1: The frame's Unobscured event will fire when the user unlocks (it will also fire Obscured when the phone is being locked). However these events will also fire for a MessageBox, a Reminder and the like so you will get other

Windows.UI.Notifications.ToastNotification API not supported in Windows Phone Silverlight 8.1?

喜你入骨 提交于 2019-12-24 03:33:48
问题 I'm trying to certify my application but I get the following errors: Error Found: The supported APIs test detected the following errors: This API is not supported for this application type - Api=Windows.UI.Notifications.ToastNotification. Module=. File=X.Service.dll. This API is not supported for this application type - Api=Windows.UI.Notifications.ToastNotification..ctor. Module=. File=X.Service.dll. This API is not supported for this application type - Api=Windows.UI.Notifications

Windows Phone: re-layout after software keyboard is shown

旧城冷巷雨未停 提交于 2019-12-24 03:19:01
问题 When the software keyboard is shown, it occludes part of the page UI. That is undesirable. Is there a way to automatically update the UI layout just like Android Activity's onConfigurationChanged? 回答1: It appears that one needs to register handler to update the layout: auto inputpane = InputPane::GetForCurrentView(); inputpane->Showing += ref new TypedEventHandler<InputPane^, InputPaneVisibilityEventArgs^>(this, &MainPage::OnInputPaneVisibilityChanged); inputpane->Hiding += ref new