win-universal-app

Webview BaseURL in Xamarin.Forms on UWP and Windows Phone 8.1

江枫思渺然 提交于 2019-12-12 11:12:48
问题 In my shared portable Xamarin project, this works on UWP, Windows Phone 8.1 and Windows 8.1: HtmlWebViewSource htmlSource = new HtmlWebViewSource(); htmlSource.Html = @"<html><body><img src='ms-appx-web:///Assets/somePicture.png' /></body></html>"; htmlSource.BaseUrl = DependencyService.Get<IBaseUrl>().Get(); WebView webView = new WebView { Source = htmlSource, }; Obviously, this isn't cross-platform (iOS and Android). I want this, but it doesn't work on UWP, Windows Phone 8.1 and Windows 8.1

Parse.com Push not working on Windows Phone 8.1

纵饮孤独 提交于 2019-12-12 10:47:08
问题 We are using Parse for push notifications on Android and IOS and works fine! I am working on a Windows 8.1 app, and cannot get it to work. The app is a Universal app developed in javascript/html/css. I followed this guide for using parse dlls in the javascript project. https://parse.com/questions/windows-8-javascript-app-push-notifications Added a new project Windows Runtime Component project and added a helper class. Downloaded the Parse SDK and added reference to Parse.dll and Parse.WinRT

How to preserve white-spaces of TextBlock in UWP apps

[亡魂溺海] 提交于 2019-12-12 10:46:59
问题 If you simply set the value of Text property in a TextBlock as " Example " (Note that there 3 whitespaces at the end of this string),what TextBlock shows in UI is just " Example ". And after searching for solutions on the Internet, I found that there is a way to solve this issue: <Border BorderThickness="1" BorderBrush="#FFFF0202" HorizontalAlignment="Center" VerticalAlignment="Center"> <TextBlock x:Name="t1"> <Run Text="Example   "/> </TextBlock> </Border> The above code shows the use of

Display a UI element (Image, Text) in Data Template of a List View on click of List View Item

北战南征 提交于 2019-12-12 10:25:29
问题 The Data Template Code <DataTemplate x:Key="CachelvTemplate"> <Grid Margin="21,3,21,3" Height="60"> <Grid.ColumnDefinitions> <ColumnDefinition Width="auto"/> <ColumnDefinition Width="*"/> <ColumnDefinition Width="auto"/> </Grid.ColumnDefinitions> <TextBlock Text="{Binding}" HorizontalAlignment="Stretch" VerticalAlignment="Center" Foreground="Black" FontSize="20"/> <Image Grid.Column="2" Source="/Assets/Icons/selectedCache.png" HorizontalAlignment="Right" VerticalAlignment="Center" Stretch=

Text input focus issue on Windows Phone (Universal) with Cordova

霸气de小男生 提交于 2019-12-12 10:22:53
问题 I'm currently building a mobile app using Cordova platform. The app was targeted on Android, iOS and Windows Phone 8. Recently, I had to change the latter to Windows Phone 8.1 (Universal). After adding the winstore-jscompat library and making couple changes to CSS everything seems to work the same way. Only thing that is not working is scrolling to focused element. In Windows Phone 8 it looks like this: Before WP8 (Ignore the darker rectangle on the bottom) And After WP8 But on Windows Phone

Universal store app getting data from server

牧云@^-^@ 提交于 2019-12-12 10:05:35
问题 I want to build an app that gets data from a server and it displays it in xaml. I'm new to universal programs and in windows store apps in general. I haven't found anything useful yet as ms sql solutions require libraries that is not allowed for universal store apps :( P.S.: The answer in how to connect sql server 2008 R2 with windows store application did not answer my question, but Jeffery's answer did. 回答1: You can’t connect to a MS SQL Server directly from the Windows App. The common way

Using ThreadPoolTimer with Background Audio UWP

早过忘川 提交于 2019-12-12 09:24:00
问题 I am making a UWP app using the BackgroundAudioTask. My app is working very well. Now I want to add in a TextBlock the Current position of the Audio played. I was doing this method before implementing the audio Task: private TimeSpan TotalTime; private DispatcherTimer timerRadioTime; private void radioPlayer_MediaOpened(object sender, RoutedEventArgs e) { TotalTime = radioPlayer.NaturalDuration.TimeSpan; // Create a timer that will update the counters and the time slider timerRadioTime = new

Set custom WebView header in UWP

坚强是说给别人听的谎言 提交于 2019-12-12 08:49:42
问题 This could seem to be duplicates of other similar questions but they are old thread and not specific to Windows UWP apps. I'm unable to set custom header in WebView so the loaded URLs in WebView could work for me. I have seen many forums giving solution like using HttpClient/WebRequest with header but that doesn't work as in my case, the web address usage Javascript for redirection and before redirection it needs few custom header to load correctly. Also WebView.NavigateWithHttpRequestMessage

Is there a correct/recommended way of detecting my UWP app I'm running on a Phone?

被刻印的时光 ゝ 提交于 2019-12-12 08:37:27
问题 Trying out Windows Universal apps with JavaScript I noticed the WinJS.Utilities.isPhone property is no longer available, which makes sense since there would be no reason to ask for that at runtime. I do want to know just for testing purposes if there is a proper way of detecting the device my app is running in. EDIT: My question is NOT about detecting a mobile browser. I'm talking about about a brand new Universal Windows App for Window 10 that can run on phones, desktops, tablets, Xbox,

Windows 10 IOT Lifecycle (or: how to property terminate a background application)

笑着哭i 提交于 2019-12-12 08:28:41
问题 In order to use a UWP application on a headless Raspberry Pi 2 with Windows 10 IOT Core we can use the background application template which basically creates a new UWP app with just a background task that is executed on startup: <Extensions> <Extension Category="windows.backgroundTasks" EntryPoint="BackgroundApplication1.StartupTask"> <BackgroundTasks> <iot:Task Type="startup" /> </BackgroundTasks> </Extension> </Extensions> In order to keep an application running, we can use the following