uwp

UWP / Xamarin crash in submission tests when I try to upload a microsoft store

我怕爱的太早我们不能终老 提交于 2020-01-14 05:31:10
问题 I am working with Xamarin Forms on a message sending application with SignalR, which I have tested countless times locally and on Android and it works fine without crashes, but when they do the tests to upload it to the microsoft store they report that my application crashes . According to the App center, the application crashes when they trying to send a message through SignalR, this is the error: < SendPrivateMessageAsync> d__46.MoveNext () + 0x14b System.Reflection.MissingMetadataException

Localization not working correctly - Language shown

对着背影说爱祢 提交于 2020-01-14 04:21:28
问题 I have one 'issue' that is driving me crazy. I must be doing or not doing something. Using C# a Universal project. I developed an App with support for 3 languages. English, Spanish and Polish. I followed these steps: Created the folder "strings" with the different subfolders for each language "en", "es", "pl". And the resources.resw inside with the different texts. In the Manifest set up as default language "en". I checked that in the manifest I have the line Language="x-generate". The thing

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

x:Bind ViewModel method to an Event inside DataTemplate

让人想犯罪 __ 提交于 2020-01-14 02:36:09
问题 I'm basically asking the same question as this person, but in the context of the newer x:Bind . ViewModels' DataContext is defined like so <Page.DataContext> <vm:ChapterPageViewModel x:Name="ViewModel" /> </Page.DataContext> So whenever I need to bind something I do it explicitely to the ViewModel like so ItemsSource="{x:Bind ViewModel.pageList, Mode=OneWay}" However that doesn't work within templates <FlipView ItemsSource="{x:Bind ViewModel.pageList, Mode=OneWay}"> <FlipView.ItemTemplate>

set focus to a textBox in uwp [duplicate]

[亡魂溺海] 提交于 2020-01-13 16:39:08
问题 This question already has answers here : Uwp navigation example and focusing on control (2 answers) Closed 2 years ago . I have a Universal Windows Platform project that has a textBox element. I'd like to set the focus to it when a Radio Button is clicked. In the Radio Button click event, I can say: txtBoxID.IsEnabled = true; txtBoxID.Text = ""; But how do I set the focus? I saw some answers saying to use: FocusManager.SetFocusedElement( but my FocusManager class doesn't have that method.

UWP - Get path to user download folder

南笙酒味 提交于 2020-01-13 12:55:32
问题 I have been looking for a little while now and am not finding much help via MSDN resources and others. My predicament is simple: my app needs a base directory to the Downloads folder. I am aware of the DownloadsFolder class however that is not suiting my needs currently. How do I get the current user's Download folder path in a Windows Universal App? 回答1: Is that what you need? string localfolder = ApplicationData.Current.LocalFolder.Path; var array = localfolder.Split('\\'); var username =

Make Clock UWP (C#)

倖福魔咒の 提交于 2020-01-13 06:58:44
问题 I'm writing application for windows 10 and need to display Time inside the UI. I made the display like this Time.Text = DateTime.Now.ToString("h:mm:ss tt"); But I need to update it, any advice on how I can do this? 回答1: Try this inside your XAML: <TextBlock x:Name="Time" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock> and this as your code: public sealed partial class ClockPage : Page { DispatcherTimer Timer = new DispatcherTimer(); public ClockPage() {

How to require Windows 10 to index a USB key from a UWP app?

限于喜欢 提交于 2020-01-11 14:03:10
问题 In Windows 10 it is possible to require the OS to index a specific location such as the D drive when a USB Key is inserted. Is it possible to this in UWP ,and how? The idea is to request permission from the user with a FolderPicker , and if granted, instruct the OS to index the location of the picked location. Thank you! 回答1: UWP does not currently provide APIs for indexing drive files. File indexing is usually established when a user begins to access a file. As you have done, you can use

UWP Manifest issue / restricted capability / inputForegroundObservation

人走茶凉 提交于 2020-01-11 13:19:27
问题 I'm trying to follow this StackOverflow article, referring to this similar article on StackOverflow, and this from the UWP Windows Dev Center. In my manifest XML, the <Package> tag was updated to include xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" and also IgnorableNamespaces="uap mp wincap rescap" . My <Capabilities> section looks like this: <Capabilities> <Capability Name="internetClient" /> <rescap:Capability Name=

UWP RichEditBox disable image resize

谁说我不能喝 提交于 2020-01-11 08:01:07
问题 I'm trying to build a native editor in which i have a rich edit box in which i insert an image. I'm able to resize the image from the editor, how can I disable resizing. Also how can i get the inserted image back. 回答1: I'm able to resize the image from the editor, how can I disable resizing If you want to keep image original size and insert to RichEditBox , you could get the image PixelWidth and PixelHeight value with BitmapImage like the follow. Windows.Storage.Pickers.FileOpenPicker open =