win-universal-app

CanExecute() returns true and button is still disabled

别等时光非礼了梦想. 提交于 2019-12-10 09:55:40
问题 I have a BottomAppBar.AppBarButton in a Windows Phone specific page, that is bound to a relay command. The code, binding and viewmodel implementation have all been used in basically the same way on other pages in the project and works exactly as expected there. The issue in this particular scenario is that the button remains disabled even after raising the .RaiseCanExecuteChanged() method, and the CanExecute() returns true . I originally thought that it might be due to excess calls to

UWP, XAML - making CheckBox empty

偶尔善良 提交于 2019-12-10 04:04:53
问题 How can I make CheckBox empty? I only need the tick. Now it takes additional empty space, like here: <CheckBox Background="Aqua" Margin="0,0,0,0"/> (I added color to look how much space this control takes (that empty space causes alligning problems)). I just need the tick rectangle, I don't want the empty space. How can I achieve that? Setting Margin to zeros and Content to "" doesn't work. 回答1: If you just want to remove the empty space on the right, you can do it by Adding Padding and

Windows 10 Universal App - Type exists in both “Windows.Foundation.UniversalApiContract”

删除回忆录丶 提交于 2019-12-10 02:08:25
问题 somehow (I have not even done anything) I get many erros in Visual Studio 2015 but I cant understand what the problem really is. It says that a lot of "types" exists in both "Windows.Foundation.UniversalApiContract" libraries. Can somebody help me? What can I do to rescue my solution and my project? I've tried to clean and rebuild it sometimes and this doesn't helped. 回答1: Looks like you are referencing both the Windows 10 SDK metadata (UAP) and the Windows 8.1 SDK metadata (Windows). Are you

Could not find a suitable SDK to target

﹥>﹥吖頭↗ 提交于 2019-12-10 01:28:53
问题 I try to create a project for UWP but I get this error: 回答1: I install windows development kit and it worked. Thanks 回答2: Part of the problem can be solved by choosing an older sdk. Choose the second newest from here: https://developer.microsoft.com/en-us/windows/downloads/sdk-archive 回答3: Installing the latest SDK didn't help me either. The installer wouldn't complete, kept getting to 97% and then rolling back. I had a whole load of MDMERGE errors like: MDMERGE : error MDM2009: Duplicate

Event Handlers not working with inkCanvas in Windows Universal App

余生长醉 提交于 2019-12-09 23:49:10
问题 I am not able to make PointerPressed, PointerReleased (any pointer event) work. I have written this line of code to support touch inkCanvas.InkPresenter.InputDeviceTypes = CoreInputDeviceTypes.Mouse | CoreInputDeviceTypes.Touch; from the solutions that I found online, I have tried this inkCanvas.PointerReleased += inkCanvas_PointerReleased; and this inkCanvas.AddHandler(PointerReleasedEvent, new PointerEventHandler(inkCanvas_PointerReleased), true); and simply through XAML as well: <InkCanvas

What's the easiest way to play audio in background in UWP?

点点圈 提交于 2019-12-09 22:58:52
问题 I am working on my Project (a soundcloud client) and the app can play tracks just fine, but not when the app is minimized. I use the MediaElement-Object for playing the mp3 from the url. How can i force the music to continue playing the music, when the app is in the background. Or whats the easiest way/best explained tutorial to implement this. I searched alot for a good answer, but the ones, i found, was too good for me :D What means, that i didn't understand it. 回答1: To play audio in the

Offer a trial of an in-app purchase

做~自己de王妃 提交于 2019-12-09 19:44:48
问题 I want to have users be able to try out functionality that is usually a paid one. Making a paid app have a trial is built in to the store. How about this in-app trial, is there a way to have that? If so - how? (C#/XAML.) 回答1: As far as I know you cannot provide a trial version for IAP straight forward. But what you want to achieve, should be easy to perform by providing second time-limited (durable) IAP, time limited. When you take a look at MSDN you will see that you can set product lifetime

Windows 10 (UWP) Coded UI

孤街浪徒 提交于 2019-12-09 18:29:36
问题 There is no Coded UI project in Visual Studio 2015 for UWP and I can't find any documentation anywhere saying there is a plan to bring support. Does anyone know if there is planned support it or have some alternative UI testing framework to work with Windows Universal? 回答1: I guess you can use this Coded UI Test Project (Universal Windows) which is under File->New->Project->Templates->Windows->Universal--> Coded UI Test Project (Universal Windows) for Coded UI project in Visual Studio 2015

App Doesn't Crash While Debugging, but Does When Running Normally

淺唱寂寞╮ 提交于 2019-12-09 18:25:42
问题 System Information Windows 10 Technical Preview (build 9926) Visual Studio Community 2013 Attempting to debug on: [AT&T] Lumia 635 (Windows 10 Technical Preview for phones build 9941 w/ Lumia Cyan) [AT&T] Lumia 1520 (Windows Phone 8.1 with Lumia Denim and PfD) [Unlocked] BLU Win Jr (Windows Phone 8.1 with PfD) [Verizon] Lumia Icon (Windows Phone 8.1 with Lumia Denim and PfD) I trying to get location services working in my app. Previously, I had Visual Studio throw the error. It was an

What is the equivalent to “OnBackKeyPress”

拥有回忆 提交于 2019-12-09 17:53:36
问题 In Windows Phone 8.0 I used this to handle the back button: protected override void OnBackKeyPress(CancelEventArgs e) { base.OnBackKeyPress(e); } This Event does not exists on the "Page" control. How can I handle a click on the back button in WP 8.1? 回答1: Take a look at Windows.Phone.UI.Input.HardwareButtons. If you add a Basic Page to your project then VS will add a NavigationHelper class to your project which helps with Navigating thru your App, you can also see in the source code that it