win-universal-app

Windows Phone 8.1 Universal App terminates on navigating back from second page?

半腔热情 提交于 2019-12-17 02:33:10
问题 I have 2 pages in my Windows Phone 8.1 Universal App. I navigate from Page1 .xaml to Page2 .xaml by using a button with the click event code: this.Frame.Navigate(typeof(Page2)); When I am on Page2, and I use the hardware back button the app closes without an exception or anything. It just returns to the startscreen. I already tried the following on Page 2 : public Page2() { this.InitializeComponent(); Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed; } void

UWP Enable local network loopback

好久不见. 提交于 2019-12-16 22:48:15
问题 I wrote a UWP-App and after generating and installing the .appxbundle, every time I start the App I get a net_http_client_execution_error . The App is starting and running fine, when started in Visual Studio 2015. So there is no chance for me to get the problem, if I debug the app. Update: By default Windows restricts apps to reach the localhost (127.0.0.1). I have running a couch database there. This couch database should run there for our costumers as well. Is it possible to allow a App to

How to synchronize resource access between UWP app and its background tasks?

筅森魡賤 提交于 2019-12-14 04:20:50
问题 In WP7 apps I use a named Mutex to synchronize access to StorageFiles and Tiles. With the async code of UWP apps this is no longer robust because mutexes are thread-affine and mixed with async code this results in errors " Object synchronization method was called from an unsynchronized block of code ". Using mutex As New Threading.Mutex(False, "SyncAppAndBackTask") Try Await ... Finally mutex.ReleaseMutex() End Try End Using Using a SemaphoreSlim is not a option here because app and

Error: DEP0001, HRESULT: 0x80073CF9 when deploying UWP app to Phone

孤人 提交于 2019-12-14 04:16:59
问题 Despite the alike existing threads here on SO, my problem is somehow different, I have an application that I made, I deploy it, works fine. I copy the same application solution, make some changes on it to create an other application that have almost the same logic as the first one (can't re-code everything from scratch), deploy it, and I receive this : Severity Code Description Project File Line Suppression State Error Error : DEP0001 : Unexpected Error: Install failed. Please contact your

ComboBox does not select binding value initially

自古美人都是妖i 提交于 2019-12-14 03:56:05
问题 First of all, not a duplicate. TextBox and CheckBox work correctly, just not ComboBox. Model internal class Word : _Model { public enum Categories { Noun, Verb, } private Categories category; public Categories Category { get { return this.category; } set { this.SetProperty(ref this.category, value); } } } Notify (safe to skip reading this part) internal abstract class _Model : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; protected bool SetProperty<T>(ref

Changing ContentTemplate using DataTriggerBehavior in UWP

一个人想着一个人 提交于 2019-12-14 03:53:54
问题 I am trying to split out my View into multiple UserControl s and then display the appropriate View depending on a certain value. I accomplish this in WPF like this: <Window.Resources> <DataTemplate x:Key="CardView"> <views:CardView /> </DataTemplate> <DataTemplate x:Key="OtherView"> <views:OtherView /> </DataTemplate> <DataTemplate x:Key="MainView"> <views:MainView /> </DataTemplate> </Window.Resources> ... <ContentControl Content="{Binding}"> <ContentControl.Style> <Style TargetType="{x:Type

Is there a good replacement for PhoneApplicationService.State in Windows Phone 8.1 (Universal App)?

这一生的挚爱 提交于 2019-12-14 03:10:07
问题 I'm porting a Windows Phone 8.0 app to a universal store app. I used the state dictionary frequently to pass state info between pages. I know the new navigation service has support for a parameter, but I was looking for something that can store state outside the scope of the page. Does anyone know the "universal app way" of keeping state information in the scope of the app? 回答1: The replacement is the SuspensionManager. You can use SuspensionManager.SessionState instead of

UWP - PivotItem mouse over change color

徘徊边缘 提交于 2019-12-14 02:36:34
问题 I want to change the Forground color of a PivotItem Header when Mouse is Over with UWP,I work with windows 10 I tried this code: <Page.Resources> <SolidColorBrush x:Key="mouseOverColor" Color="Red" /> </Page.Resources> <Pivot HeaderTemplate="{StaticResource HeaderTemp}" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="10,0,10,0"> <VisualStateManager.VisualStateGroups> <VisualStateGroup> <VisualState x:Name="Narrow"> <VisualState.StateTriggers> <AdaptiveTrigger MinWindowWidth="0" /

Communicate between computers through Ethernet cable

倖福魔咒の 提交于 2019-12-13 23:58:21
问题 I want to connect two computers with an Ethernet cable without the user having to set up a LAN through the Control Panel and then transfer data between two instances of my app - one running on each computer. As soon as I have a connection with an IP address for each computer, I know I can easily transfer a file by using Sockets, Pipes(?), WCF... But both computers are also connected via wifi to a router, so how can I somehow tell the computer that for a specific IP address - please use the

How does LocalSettings work?

风流意气都作罢 提交于 2019-12-13 21:30:29
问题 i'm struggling myself with a question - how does in fact LocalSettings work. It's an ApplicationDataContainer class, but is this some kind of a file? Probably yes, but when it's saved? For example we can save some data like this: localSettings.Values["exampleSetting"] = "Hello Windows"; but is it saved to file just after we add/change the Value or it's held somewhere in the memory and saved when App is being Suspended/Terminated? And the main purpose of the question: Do I've to guard the