windows-phone-8.1

How to avoid StorageFile.CopyAsync() throw exception when copying big file?

元气小坏坏 提交于 2019-12-10 13:24:19
问题 I'm going to copy some files from Video Library to my app storage through StorageFile.CopyAsync() method, but if a file's size is more than 1GB, it would throw an exception as follow: Type: System.Runtime.InteropServices.COMException Message: Error HRESULT E_FAIL has been returned from a call to a COM component. Stacktrace: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task

Goto VisualState in Listivew item DateTemplate windows phone 8.1

百般思念 提交于 2019-12-10 11:15:22
问题 My requirement: when tapped on the border in ListViewItem(DataTemplate) an overlay should appear on top of it with animation. In my listview data template I defined a visual state at the root. I want to goto the visual state when user taps on the border. I have tried following xaml but it is not working <DataTemplate x:Key="MyTemplate"> <Grid Background="{Binding ItemBackground}" Margin="0,0,0,5" Height="auto"> <VisualStateManager.VisualStateGroups> <VisualStateGroup > <VisualState x:Name=

Styling Windows Phone 8.1/WinRT AppBarButton

你离开我真会死。 提交于 2019-12-10 11:07:04
问题 I'm currently looking to implement a CommandBar for a WinRT Windows Phone 8.1 app. Overall it is very straightforward but I am unable to style the control. I have themed my app so that the accent colour has been changed to green. This works well for pretty much everywhere in the app (buttons, textblocks etc.) but not for the AppBarButton. The brushes I'm overriding are SystemColorControlAccentBrush and PhoneAccentBrush but changing these does not make any difference to the colour of the

Windows Phone 8.1 - Data virtualization with pictures library images on gridview

こ雲淡風輕ζ 提交于 2019-12-10 10:35:32
问题 I'm building a Windows Phone 8.1 app which requires me to display all images in the pictures library in a GridView. I have built a class named VirtualList which is a list that supports IncrementalLoading, and I have added all the images from pictures library to that list. When there are a reduced number of images (less than 80 photos), everything works fine, but when there are more than 80 photos, the app shuts down due to an OutOfMemoryException. I suppose that the items that aren't

MediaEncodingProfile.CreateWmv gives “No suitable transform was found to encode or decode the content.” error

孤者浪人 提交于 2019-12-10 10:02:37
问题 I am creating a Windows Phone app (XAML/C#) that uploads audio and video to a server. Using VideoCaptureDevice on Windows Phone 8.0 works fine, but it only allows resolutions supported by the device (on a Nokia 625 the smallest is 640 x 480). To get the size down I have upgraded the app to Windows Phone 8.1 Silverlight (Developer Preview) to use the Windows.Media.Capture.MediaCapture libraries. This works and the generic Qvga format: MediaEncodingProfile profile = MediaEncodingProfile

Background Agents in Windows phone 8.1 (Silverlight )

余生颓废 提交于 2019-12-10 09:44:02
问题 I am following this link for implementing the ScheduledAgent in WP 8.1 Silverlight. Steps :- Edited WMAppManifest.xaml : <Tasks> <DefaultTask Name="_default" NavigationPage="/View/StartPage.xaml" /> <ExtendedTask Name="BackgroundTask"> <BackgroundServiceAgent Specifier="ScheduledTaskAgent" Name="ScheduledTaskAgent2" Source="ScheduledTaskAgent2" Type="ScheduledTaskAgent2.ScheduledAgent" /> </ExtendedTask> </Tasks> Added new ScheduledAgent project with targeted version 8.1. : Now my

Toast notification & Geofence Windows Phone 8.1

社会主义新天地 提交于 2019-12-10 07:50:03
问题 I'm facing a strange problem with my Windows Phone 8.1 App. The App will send a toast notification every time the user is near a Point of his interest using Geofence Quickstart: Setting up a geofence and BackgroundTask Quickstart: Listening for geofence events in the background And this is the Background task (example) public void Run(IBackgroundTaskInstance taskInstance) { // Get the information of the geofence(s) that have been hit var reports = GeofenceMonitor.Current.ReadReports(); var

Wrong version number submitted to Windows Phone Store. Is it possible to correct this?

余生颓废 提交于 2019-12-10 04:22:59
问题 I deployed an app to the Windows Phone Store and the version number that got deployed is different than the version in the app manifest. The version that got deployed is something like 2014.MMDD.ABC.XYZ It should have been 1.0.0.0. Why was the version number changed, and is it possible to change it to what it should be? 回答1: According to this thread this is expected behaviour for app bundle packages. Rob writes: This is expected behavior for app bundle packages. They are always versioned

How to discover Bluetooth Low Energy Device(BLE) from Windows Phone 8.1

久未见 提交于 2019-12-09 20:59:18
问题 I am writing a Silverlight Windows Phone 8.1 application, I am trying to connect with Bluetooth Low Energy(BLE) device from Windows Phone 8.1, the device is "HEART RATE", but I'm not getting the result. See my code below. protected async override void OnNavigatedTo(NavigationEventArgs e) { var devices = await DeviceInformation.FindAllAsync(GattDeviceService.GetDeviceSelectorFromUuid (GattServiceUuids.HeartRate)); if (devices.Count > 0) { } } I have also added capability in appmanifest file.

Apply Pointer up/down effect to windows phone 8.1 app

混江龙づ霸主 提交于 2019-12-09 19:30:25
问题 I've migrated my windows phone 8 app to windows phone 8.1 runtime. Apparently the tilt effect is included. How would I add this to a custom control? Thanks, 回答1: Hence you are targeting rintime, you may look at Windows.UI.Xaml.Media.Animation classes and espestially: PointerDownThemeAnimation and PointerUpThemeAnimation - there are simple examples there. Mostly what you have to do is put those animations into VisualStates and VisualTransitions, simple example can look like this: <Style x:Key=