uno-platform

[iOS][Android]: How to hide the status bar with platform UNO?

Deadly 提交于 2021-01-29 21:15:19
问题 How would I hide the status bar on top of the screen in iOS (and Android). Believe, Xamarin.Forms has a way to do that. But how would I do that with Platform UNO? Thanks in advance Dierk 回答1: Uno Platform supports the UWP StatusBar API on Android and iOS, you can hide and show the status bar in the following manner: private void HideStatusBar() { var statusBar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView(); Windows.UI.Xaml.Window.Current.Dispatcher.RunAsync( Windows.UI.Core

[iOS]; How to leave space for top and bottom status bar

荒凉一梦 提交于 2021-01-28 07:51:00
问题 I found that hiding the status bar (at least on latest iPhones) does not make much sense since the space on top is partially consumed e.g. by the camera. Similar issue at the bottom: there is a 'swipe bar' where some space should be left for. Hence my question: what's the correct way to leave the right amount of space for the status bar on top of the iPhone screen and the 'swipe bar' at the bottom of an iPhone screen? Thanks in advance 回答1: Indeed, making sure that app content isn't obscured

Cannot Change Accent Color for WASM on Uno 2.4

[亡魂溺海] 提交于 2021-01-28 05:35:14
问题 I defined a new accent color in App.xaml lke this: Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" /> </ResourceDictionary.MergedDictionaries> <Color x:Key="SystemAccentColor">#FFCB2128</Color> <Color x:Key="AcmGreen">#FFB8C282</Color> <Color x:Key="AcmPink">#FFE672A4</Color> <Color x:Key="AcmPurple">#FF71749E</Color> <Thickness x:Key="PivotItemMargin">0</Thickness> </ResourceDictionary> <

Uncaught Type JavaScript Error In Uno.Lottie WebAssembly

只愿长相守 提交于 2020-06-16 17:43:47
问题 I have an AnimatedVisualPlayer on my Page for playing a Lottie: <winui:AnimatedVisualPlayer x:Name="player" AutoPlay="true" Width="150" Height ="150" PlaybackRate="1.5"> <lottie:LottieVisualSource UriSource="ms-appx:///Lottie/waiter.json" /> </winui:AnimatedVisualPlayer> I installed these packages: Microsoft.Toolkit.Uwp.UI.Lottie (for theLottieVisualSource) Microsoft.UI.Xaml (for the AnimatedVisualPlayer) Uno.UI.Lottie (for the LottieVisualSource) Uno.UI (for the AnimatedVisualPlayer) I did

Android/WASM : prismMvvm:ViewModelLocator.AutoWireViewModel=“True” is not Wire-up the ViewModel for Android and Wasm

匆匆过客 提交于 2020-06-01 07:38:25
问题 I am trying to auto-wire up the ViewModel using prismMvvm:ViewModelLocator.AutoWireViewModel="True" in my View. For UWp it working perfectly. But with-in Android and WASM, View not able to wire up the ViewModel in my Uno platform Application using Prism. <UserControl x:Class="RepayablClient.Shared.Views.Login" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

How to use `MediaElement` to play sound in Android?

♀尐吖头ヾ 提交于 2020-01-14 04:00:31
问题 I'm using MediaElement to play sound in an Uno-Platform project. It plays well in the UWP project but doesn't work in the Android project. The audio file is located in the shared project as Exclude from project , and is linked in the UWP project as Content and in the Droid project as AndroidAsset . XAML: <MediaElement Source="/Assets/MySound.wav"/> I've also tried accessing it programmatically set the Source to ms-appx:///Assets/MySound.wav with no success. 回答1: MediaPlayerElement is now

Workaround needed for WebView in UNO framework for WebAssembly

被刻印的时光 ゝ 提交于 2019-12-10 18:23:26
问题 Currently, I am working on a UNO platform application which should display dynamically created HTML code in a WebView . This is working fine on UWP and Android, but not in the compiled WebAssembly . Is there some kind of workaround I could use here? I thought about a simple IFRAME , but obviously there is no possibility to include HTML in the XAML file. Or am I wrong? To be more specific: The WebView's NavigateToString("<html><head></head><body>BLAH!</body><html>") method leads to the desired

How to use `MediaElement` to play sound in Android?

耗尽温柔 提交于 2019-12-08 19:51:29
I'm using MediaElement to play sound in an Uno-Platform project. It plays well in the UWP project but doesn't work in the Android project. The audio file is located in the shared project as Exclude from project , and is linked in the UWP project as Content and in the Droid project as AndroidAsset . XAML: <MediaElement Source="/Assets/MySound.wav"/> I've also tried accessing it programmatically set the Source to ms-appx:///Assets/MySound.wav with no success. MediaPlayerElement is now available in Uno (See MediaPlayerElement documentation) As of today, local resources are not supported for iOS