windows-phone-8.1

ListBox Selected Item Style for Windows Phone 8.1

不问归期 提交于 2019-12-11 00:41:01
问题 I have a simple listbox and I would like to change the Style so that when an item is selected, the border of the item changes colour. Currently my ListBox and style is defined as: <ListBox x:Name="DaysList" HorizontalContentAlignment="Stretch" Background="Transparent" Height="300" Grid.Row="1" > <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem"> <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter> <Setter Property="FontSize" Value="30" /> <Setter Property=

How can I add <Run Text=“xx”/> to TextBox c#? Or how can I append dynamic string to static string in TextBox?

僤鯓⒐⒋嵵緔 提交于 2019-12-11 00:22:46
问题 In WPF, I know that for TextBlock when I want to append some "dynamic" string to a string I can do something like the following : <TextBlock> <Run Text ="static string"/> <Run Text="{Binding dynamicstring}"/> </TextBlock> However, the same method doesn't work for TextBox, is there anyway to do the same thing with TextBox 回答1: Try using RichEditBox. <RichEditBox> <Paragraph> <Run Text="Static Text" /> <Run Text="{Binding Dynamic}" /> </Paragraph> </RichEditBox> If you're using Windows Phone

Cordova windows phone app camera orientation is wrong

左心房为你撑大大i 提交于 2019-12-10 23:30:52
问题 I am using Cordova to create Hybrid app for windows phone in visual studio 2015. I am facing problem with camera orientation while facing front camera. here is my code if (!navigator.camera) { alert("Camera API not supported", "Error"); deffered.reject('Unable to open camera'); return deffered.promise; }; if( direction === undefined ) { direction = 0; } var options = { quality: 50, destinationType: Camera.DestinationType.FILE_URI, sourceType: 1, // 0:Photo Library, 1=Camera, 2=Saved Album

Cordova/Phonegap: WP8.1 Navbar overlapping

喜欢而已 提交于 2019-12-10 22:41:01
问题 My cordova application is built for WP 8.0 Target. When running it on a WP8.1 device that doesn't have hardware buttons but a toggleable navbar instead, the HTML content is overlapped by the navbar. When hiding the navbar, the black background of the navbar stays and still overlaps the HTML. It is also possible to scroll the entire webview so i can see the overlapped content as well as the content of the webview. Is it possible to prevent this overlapping or prevent the scrolling of the

Windows Phone Flyout stays always on top

非 Y 不嫁゛ 提交于 2019-12-10 21:37:32
问题 The Flyout control of the Windows Phone SDK (WP 8.1) doesn't work as I expected. No matter how I change the Placement Property, the only thing that changes something is PlacementMode.Full. Top, Bottom, Left & Right still keep the Flyout on top of the Display. Is there another way to show the Flyout at the bottom of my Page? For example the calender app from Microsoft has this exact behaviour while changing the view by pressing the right AppBarButton of the CommandBar. Here are two ways I

How can I accept “unsafe” HTTP response headers in a Windows Phone/Store app?

雨燕双飞 提交于 2019-12-10 20:57:15
问题 Recently, some code in a Windows Phone 8.1 Silverlight app that used HttpClient to access a 3rd-party REST API stopped working. I got the following error: A first chance exception of type 'System.Exception' occurred in mscorlib.ni.dll Additional information: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) After trying this in Windows Phone (Silverlight) and Store (RT) apps, I rewrote the same code in WPF and finally got a useful error message: The server committed a

Login from Universal App to Web Api using Live Id

末鹿安然 提交于 2019-12-10 20:03:46
问题 I'm trying to implement following functionality: User signs in into Live Id account from Windows Phone 8.1 (or Universal) app. App accesses Web Api that I develop with ASP.NET Web Api 2 In this Web Api I need to authenticate the user. Later, I want to authenticate same user in web app Here is what I'm doing, and it doesn't work. In my Windows Phone App: var authClient = new LiveAuthClient("http://myservice.cloudapp.net"); LiveLoginResult result = await authClient.LoginAsync(new string[] { "wl

VS + Cordova + WP8 = requirejs load timeout for modules

笑着哭i 提交于 2019-12-10 19:08:47
问题 I am building a windows phone mobile game using Visual Studio 2015 + Cordova. When trying to debug on device I get this error: Unhandled exception at line 8, column 137 in ms-appx-web://net.boardgamesonline.drawit/www/js/libs/require.js 0x800a139e - JavaScript runtime error: Load timeout for modules: sounds,libs/signals.min,config,components/share.... My VS runs on Windows 10 and has everything updated (cordova, sdks, tools..) The same project was built for Android and iOS using Intel XDK and

How to disconnect Windows Phone 8.1 emulator from network?

泄露秘密 提交于 2019-12-10 19:01:09
问题 I want to test my app when it is disconnected from network (Internet connection). How to simulate the scenario in which phone doesn't have an Internet connection? 回答1: Do the following steps: Go to Network tab of the emulator's Additional Tools . Check Enable Network Simulation to test your app with different network speeds and different signal strengths. In the Network Speed dropdown list, select the option: No network Click Refresh 来源: https://stackoverflow.com/questions/28847408/how-to

windows phone 8.1 music library get current media queue

杀马特。学长 韩版系。学妹 提交于 2019-12-10 18:27:20
问题 How to get current media queue in windows phone 8.1 (runtime) as in windows phone 8 MediaPlayer.Queue Is it available or we have to implement? Similarly IsShuffled functionality is there ? 回答1: The MediaPlayer API belongs to the Microsoft.Xna.Framework.Media namespace which is no longer available for WinRT components. So you can't use it but you can implement your own logic for it using the MediaElement API which has sufficient properties for a media player except for the logic of queuing etc