[Solved] Album art of mp3 music file [duplicate]

You could use StorageFile.GetThumbnailAsync method to do this. If you want to get more info, please refer to the Scenario2 of official sample. XAML code: <Grid> <StackPanel> <Button Content=”Load Album art” Click=”Button_Click”/> <Image x:Name=”ImageControl”/> </StackPanel> </Grid> Code behind: private async void Button_Click(object sender, RoutedEventArgs e) { FileOpenPicker openPicker = new FileOpenPicker(); openPicker.SuggestedStartLocation = PickerLocationId.Downloads; openPicker.FileTypeFilter.Add(“.mp3”); … Read more

[Solved] How should IBuffer objects generated through Windows.Security.Cryptography be managed securely?

You can wipe out the buffer if you like after use, even with C#. Here is a handy helper: public static class BufferExtensions { public async static Task ClearContentsAsync(this IBuffer buff) { var writer = new DataWriter(buff.AsStream().AsOutputStream()); for (var i = 0; i < buff.Capacity; i++) writer.WriteByte(42); await writer.StoreAsync(); } } Use it like this: … Read more

[Solved] how to post string to URL in UWP

You can upload a file with the HttpClient (which replaces the WebClient in UWP) Code: private async Task<string> UploadImage(byte[] file, Uri url) { using (var client = new HttpClient()) { MultipartFormDataContent form = new MultipartFormDataContent(); var content = new StreamContent(new MemoryStream(file)); form.Add(content, “postname”, “filename.jpg”); var response = await client.PostAsync(url, form); return await response.Content.ReadAsStringAsync(); } } … Read more

[Solved] when swiping from bottom of screen, taskbar should be visible – UWP [closed]

when swiping from bottom of screen, taskbar should be visible – UWP For your requirement, you need detect the taskbar‘s ManipulationDelta event, and if Cumulative.Translation.Y more than your threshold then invoke double animation to move taskbar down or up. For example private bool _isSwiped; private void StackPanel_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e) { if (e.IsInertial && !_isSwiped) … Read more

[Solved] How can I get the file type of a download?

Put aside background transfer APIs, I think the first question actually you should know is “how to get the file extension from a download Uri”. For this,we need to consider several scenarios about the “Uri”. The download Uri does have a file extension followed, for example: https://code.msdn.microsoft.com/windowsapps/Background-File-Downloader-a9946bc9/file/145559/1/BackgroundDownloader.zip. In this case, we can use Path.GetExtension method … Read more

[Solved] Async Wait issues with view updation in UWP

Since calling Bindings.Update() fixed your issue, your binding expressions should be correct, but somehow the property change notification fails. I am not going to guess what really went wrong here but to explain when you should be using Bindings.Update(), and when you should be using INPC + OneWay bindings. Bindings.Update() is only available for x:Bind, … Read more