uwp

UWP UnauthorizedException

僤鯓⒐⒋嵵緔 提交于 2019-12-04 09:47:14
I am currently writing my first UWP app just to learn the ropes. I am building a small application that pulls data from downloaded facebook-archive. But when I try to open the file (even though everybody has full access) I get an UnauthorizedException. I don't understand this and I haven't found anybody having this problem with just any old file (there are many people having problems with more specific scenarios but not just a simple file on their hard drive) System.UnauthorizedAccessException was unhandled by user code HResult=-2147024891 Message=Access to the path 'C:\Users\patri\Downloads

how to hide / collapse title bar in a UWP app?

拟墨画扇 提交于 2019-12-04 09:37:20
问题 Is there a way to somehow hide / collapse / make temporarily invisible (but not fully disable) titlebar in a UWP app? I know that it is possible to make app fullscreen after which title bar automatically collapses, but I need to implement it in a resizable desktop window. I also know that you can customize appearance of titlebar, like color, etc. Reason: I have an application with a lot of windows and need to save screen space and have more room for client area of windows. I've read different

UWP apps accessing files from random location on system

ε祈祈猫儿з 提交于 2019-12-04 09:37:17
in UWP there are files and permissions restrictions, so we can only acces files directly from few folders or we can use filepicker to access from anywhere on system. how can I use the files picked from filepicker and use them anytime again when the app runs ? tried to use them again by path but it gives permission error. I know about the "futureacceslist" but its limit is 1000 and also it will make the app slow if I am not wrong? . Is there a better way to do this ? or can we store storage files link somehow in local sqlite database? Considering this method.. public async static Task<byte[]>

In universal windows apps, how to change the background color of a button using xaml and databinding if a property in the view model changes

邮差的信 提交于 2019-12-04 09:29:49
Universal windows apps don't support data triggers. Without data triggers, how can I change the background color of a button using xaml and data binding only when a boolean property in the view model changes? For example given this XAML: <StackPanel> <Button Name="ButtonA" Click="ButtonA_Click" Content="A" /> <Button Name="ButtonB" Click="ButtonB_Click" Content="B" /> <Button Name="ButtonC" Click="ButtonC_Click" Content="C" /> </StackPanel> with this code behind private void ButtonA_Click(object sender, RoutedEventArgs e) { Model.IsOnA = !Model.IsOnA; } private void ButtonB_Click(object sender

How can a universal windows app have multiple independent windows (Like Microsoft's app “Photos”)?

泪湿孤枕 提交于 2019-12-04 08:45:26
问题 I do know how to open additional windows using TryShowAsStandaloneAsync . However, if the original window is closed - TryShowAsStandaloneAsync fails (Why?). And I don't know how to "revive" it (-the original window). But "Photos" seems to work fine just like a desktop application. How does it do that? (I'd like to emulate that.) One can open a window with an image, open another one, close the first, and still be able to open more windows. Any way would be fine - some way to launch windows

Use Python alongside C# in Windows UWP app

怎甘沉沦 提交于 2019-12-04 07:35:15
I started writing an application in Python, but I now want to switch to C# and UWP. I know that you cannot write a UWP app in Python, but I am trying to see if I can write some code in Python and access that code from C#. For example, writing a class in Python that C# code can access as well. Is that possible? And if so, can Python access Microsoft's UWP APIs? The main code will not be written in Python; that would be impossible. But can interoperability between C# and Python exist, perhaps with IronPython (.NET's Python)? And how would I set up such a Visual Studio project? I have Python

How to see (approximate) memory usage in an UWP App while it's running

拜拜、爱过 提交于 2019-12-04 07:21:32
According to this article on Diagnosing memory issues with the new Memory Usage Tool in Visual Studio : 1. Memory caps on Phone devices : In particular for Phone, there are specific memory limits enforced on an application based on the size of the memory in the device. Allocating more than the specified limit will cause an OutOfMemoryException and will result in app termination. All well and good, and in Visual Studio you can use the Diagnostics tool to see memory usage during development. Is there any way a UWP app running on a (Windows 10) phone can get an approximate idea of how much memory

Databinding MediaPlaybackItem to ListView Item in DataTemplate

陌路散爱 提交于 2019-12-04 06:47:42
问题 Hello i have the following listView : <ListView x:Name="SongList" HorizontalAlignment="Left" Visibility="Visible" Height="615" Background="White" Opacity="0.5" SelectedValue="selectedFile" ItemsSource="{Binding MediaModels.MediaPlaybackItemsList , UpdateSourceTrigger=PropertyChanged}" Margin="986,105,0,0" VerticalAlignment="Top" Width="294"> So in my itemSource i bind a list of MediaPlaybackItem .Thats fine everything works good except i dont know how to bind the artist and title for each

Can't bind CalendarDatePicker to a model in Xaml UWP

只愿长相守 提交于 2019-12-04 06:46:19
问题 I have model class in shared PCL (for android and uwp app) that contain datetime property: public class Meter { public int meter_value {get; set; } public DateTime meter_start { get; set; } public DateTime meter_end { get; set; } ... other int and string properties } In MainPage.cs i have public Meter _meter; public MainPage() { this.InitializeComponent(); _meter = new Meter(); } I'm trying to bind this to a xaml controls with following code: <TextBox Text="{x:Bind _meter.meter_value, Mode

Extract icon from UWP application

。_饼干妹妹 提交于 2019-12-04 06:37:43
问题 While trying to implement "Open With" functionality I encountered a problem with extracting icons from UWP applications. So, after receiving list of recommended applications to open particular file with the help of SHAssocEnumHandlers, I'm trying to extract icons for each of these applications with the help of IAssocHandler::GetIconLocation and classical ExtractIcon() . Everything works ok with programs like Paint, for example. I have full path to Paint binary and can extract icon from it.