uwp

UWP DataTransferManager ShowShareUI() Opens Sharing Dialog with “This app can't share right now” and Closes it Immediately After

喜欢而已 提交于 2019-12-11 16:03:12
问题 I am trying to share a file from my UWP app sandbox running on Windows 10 desktop. Following MS documentation on this page, the implementation seem to be fairly straight forward; however, I am having issues https://docs.microsoft.com/en-us/windows/uwp/app-to-app/share-data I created DataTransferManager and attached DataRequested event in c-tor of my class as per explanation in the article: DataTransferManager dataTransferManager; public MainPage() { this.InitializeComponent(); ...

How do I keep the status of content during the navigation?

我与影子孤独终老i 提交于 2019-12-11 16:01:15
问题 I have a Frame in MainPage , and there's content in MainPage , for example, a List which is dynamically generated by a function (let's call it loadList() ) which is invoked by the Loaded event of MainPage . After user clics on any items in the List , The Frame could be navigated to another page (lets call this DetailPage ). Every time I navigate back to the MainPage from DetailPage , the MainPage invokes the Loaded event, therefore invokes the loadList() again. My question is, that, is there

Call a function from UserControl - UWP C#

ⅰ亾dé卋堺 提交于 2019-12-11 15:55:19
问题 I'm using below code for rotate an image in my app (using UserControl). But it shows an error ConvertToBitmapImage was not found in type ImageControl . How can I resolve it? The ImageControl XAML: <UserControl x:Class="App1.ImageControl" ...> <Image RenderTransformOrigin="0.5,0.5" Source="{x:Bind ConvertToBitmapImage(UriPath), Mode=OneWay}" Stretch="UniformToFill"> <Image.RenderTransform> <CompositeTransform Rotation="{x:Bind Angle, Mode=OneWay}" /> </Image.RenderTransform> </Image> <

Automatic BLE disconnect-connect - Windows10, Android

萝らか妹 提交于 2019-12-11 15:50:55
问题 When I try to reconnect, immediate and automatic [disconnect-connect-disconnect-...] happens before they truly connect and read/write/subscribe. PC: Windows10(1903), using CSR 4.0 dongle + UWP app for BLE pairing/connection Mobile: LG V40, Galaxy Note5, LG X Power, Galaxy S9+, Galaxy S10 V40 ALMOST ALWAYS : automatic quick discon-con happens 10 times or more S10 ALMOST ALWAYS : similar to V40. *First connection (step 3 below) doesn't work. Takes forever to find the services that I get timeout

IRandomAccessStream does not support the CloneStream method because it requires cloning and this stream does not support cloning

两盒软妹~` 提交于 2019-12-11 15:46:14
问题 Hi I'm building a UWP application (targeting 10240 and Microsoft.NETCore.UniversalWindowsPlatform 6.0.5) and the following simiple code throws an exception: var ms = new MemoryStream(new byte[16]); var randomAccessStream = RandomAccessStreamReference.CreateFromStream(ms.AsRandomAccessStream()); var newStream = await randomAccessStream.OpenReadAsync(); This code is throwing the exception: Message=This IRandomAccessStream does not support the CloneStream method because it requires cloning and

How to access files or folders the user picked in a previous session of my UWP app?

一笑奈何 提交于 2019-12-11 15:45:18
问题 My application asks the user to pick a single file (or an entire folder) from which I will load content. I can use the FileOpenPicker and FolderPicker classes for this, and it works fine. The problem is that if the user closes my app (or it gets suspended and terminated) I lose access to the StorageFile or StorageFolder that was returned from the picker. I don't want to ask the user to pick the same file or folder again (that would be annoying). I have considered saving the Path of the file

Microsoft Graph API PUT OneDrive/SharePoint

ぐ巨炮叔叔 提交于 2019-12-11 15:44:17
问题 Trying to post a file to a subfolder of the Shared Documents folder. I thought I had the correct syntax down, but I keep getting StatusCode 400 Bad Request. https://graph.microsoft.com/v1.0/sites/xxxxxx.sharepoint.com,495435b4-60c3-49b7-8f6e-1d262a120ae5,0fad9f67-35a8-4c0b-892e-113084058c0a/drives/b!tDVUScNgt0mPbh0mKhIK5WefrQ-oNQtMiS4RMIQFjAqJk9Tt237bQYC9yEkyNOr6/items/01JDP7KXJ7ZSCYHUJC7BFJW2X6BTR4Z4JH:/filename.xlsx:/content where "filename" is the actual filename. I know a GET to the

Unable to Change Scopes in UWP Sample Microsoft Graph

旧巷老猫 提交于 2019-12-11 15:41:18
问题 I am using this UWP sample: https://github.com/microsoftgraph/msgraph-training-uwp It demonstrates Microsoft Graph, A service for allowing useres to login to apps with their microsoft account so that the app can access the users granted data. By default, the sample requests the calandar's scope, to veiw calandar data, but I would like to edit the sample to access the scope of the user. This is because my app uses in app purchases, and is on a public machine, and I want what users do to be

UWP Touch Volume Control

大兔子大兔子 提交于 2019-12-11 15:41:16
问题 I need to implement Tap (Touch) volume control using UWP code. For example, if I tap a button in my terminal, the volume of tapping sound could control in App settings. This control must link into the mobile or any other devices. Few investigations: Tap sound from an adjustment of Ringtone Volume in our mobile. so we need to get the response from Ringtone settings. I've searched most about this, but couldn't find the solution. Update at Slider change event: Slider slider = sender as Slider;

Question on UWP DataGrid data binding using MVVM

老子叫甜甜 提交于 2019-12-11 15:29:55
问题 For the first time trying to use MVVM to bind data in a .NET app. Coming from a legacy .NET world, I'm not quite understanding the use of MVVM in a UWP app. I'm trying to bind following DataGrid control in my UWP app with my MVVM (shown below) that is a class created on the top level of the project named My_UWP_Project . Question : To populate customer data, what value should I add to ???? of ItemsSource="{x:Bind ????}" line of DataGrid control? Remark : For data binding, I'm using new