windows-phone-8.1

Display a TextBlock over a MediaElement when in full screen

荒凉一梦 提交于 2020-01-03 05:50:30
问题 I have a MediaElement and a TextBlock next to it. But when I set MediaElement to fullscreen, this TextBlock disappears. Can anyone share a solution? <MediaElement Name="player" Margin="10,5" AreTransportControlsEnabled="True" /> <TextBlock Margin="10"/> 回答1: As I have said in this thread, when we are in the Full Window mode, it will go to the FullWindowMediaRoot layer with the MediaTransportControls. In this way the TextBlock will disapper, because there is no place to show the TextBlock. In

C# Windows Phone 8.1 Language selection

自闭症网瘾萝莉.ら 提交于 2020-01-03 01:20:13
问题 I hope this wasn't asked before, I couldn't find an easy solution in MSDN or here. The windows phone 8.1 application is deployed in more than one language. To do so I use the default language (english) in Strings\en-US\Ressources.resw and installed the Multilingual App Toolkit with all further languages added there. To change the language, I have the following code: private void changeLang(string cul) { Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = cul; Windows

Disabling swipe gesture in Windows Phone 8.1 pivot control

孤街醉人 提交于 2020-01-02 23:04:40
问题 I am making a Universal app. For the windows phone part I have implemented a pivot page in it. Now I want the swipe gesture (for navigating through different pivot items) in pivot page to be disabled so that only when a button on the first PivotItem is tapped then it shows the second PivotItem. I tried setting the IsHitTestVisible property of the Pivot control to false but then all the PivotItem are blocked. 回答1: It goes against the WINDOWS UI Guide and shouldn't really be implemented.

UWP Place TextBlocks on Image

寵の児 提交于 2020-01-02 13:12:30
问题 I'm currently developing universal application that can run on both mobiles and desktops. But I have a little trouble. In my application I have a page to add new credit card to the user profile. So, I set the text on the image using margins, but when my application runs on the device with different resolution, the text will change its position (it's obvious). My question is, how can I do that to let text take its position according to the screen resolution? Here is the correct variant of the

UWP Place TextBlocks on Image

落花浮王杯 提交于 2020-01-02 13:12:22
问题 I'm currently developing universal application that can run on both mobiles and desktops. But I have a little trouble. In my application I have a page to add new credit card to the user profile. So, I set the text on the image using margins, but when my application runs on the device with different resolution, the text will change its position (it's obvious). My question is, how can I do that to let text take its position according to the screen resolution? Here is the correct variant of the

Image being saved from canvas is not rendered properly

白昼怎懂夜的黑 提交于 2020-01-02 08:11:14
问题 I'm trying to use the following code to save the contents of myCanvas as an image file in the gallery (for Windows Phone 8.1, not Silverlight). When I run the App, the image is saved but it is distorted. What am I doing wrong? I have uploaded the resultant image and the expected result. public async void SaveFileToPhone() { var file = await KnownFolders.PicturesLibrary.CreateFileAsync("bug.png", CreationCollisionOption.GenerateUniqueName); await SaveVisualElementToFile(myCanvas, file); }

Image being saved from canvas is not rendered properly

谁说我不能喝 提交于 2020-01-02 08:11:05
问题 I'm trying to use the following code to save the contents of myCanvas as an image file in the gallery (for Windows Phone 8.1, not Silverlight). When I run the App, the image is saved but it is distorted. What am I doing wrong? I have uploaded the resultant image and the expected result. public async void SaveFileToPhone() { var file = await KnownFolders.PicturesLibrary.CreateFileAsync("bug.png", CreationCollisionOption.GenerateUniqueName); await SaveVisualElementToFile(myCanvas, file); }

Getting number of files in StorageFolder

陌路散爱 提交于 2020-01-02 07:05:31
问题 I was working with a Windows Phone 8.1(RT) application, I wanted to know how to get the number of files inside a StorageFolder . I know we can use StorageFolder.GetFilesAsync() and then check the count of this list returned. But since this method takes too long and returns all items is there more efficient method of getting this done? 回答1: You can get 3 orders of magnitude faster performance if you use Win32 APIs to get the file count, but it only works for your local storage directory (it

Check if user added new music on Windows Phone 8.1

六月ゝ 毕业季﹏ 提交于 2020-01-02 05:46:09
问题 I'm trying to find out if a user added new music to the Music folder on the phone since app was last used. I try to do this by checking the DateModified of the Music folder (which updates correctly on the computer when adding new music to the phone): async void GetModifiedDate () { BasicProperties props = await KnownFolders.MusicLibrary.GetBasicPropertiesAsync(); Debug.WriteLine("DATEMODIFIED: " + props.DateModified.ToString()); } Unfortunately this returns: DATEMODIFIED: 1/1/1601 1:00:00 AM

ISupportIncrementalLoading Collection - notify UI when LoadingMoreItems is in progress

耗尽温柔 提交于 2020-01-01 19:54:06
问题 I've have created a IncrementalLoadingCollection class in my app which implements ISupportIncrementalLoading and inherits from ObservableCollection< T > . It works fine and the items are loaded but I would like to show a message on the app's Status Bar that there is some work in progress. What's a good way of achieving this? Since LoadMoreItemsAsync is called internally when the list is scrolled, I cannot access that part to come up with the code which updates the Status Bar . Right now, I am