win-universal-app

Universal app in windows MVVM [closed]

橙三吉。 提交于 2019-12-06 04:45:39
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . I have just started to develop in universal app. I have developed app in Windows 8 store apps and also developing Windows Phone 8 and Windows Phone 8.1 (SilverLight) Apps. Question is related to universal app in Windows and Single UI which is created in App. Share folder. 1.

Using Windows UWP Windows.Devices.SerialCommunication.SerialDevice from Universal Class library

﹥>﹥吖頭↗ 提交于 2019-12-06 04:31:11
问题 I'm making a Modbus library (again...). This time it is meant to run on Windows 10 IoT Core. I've encountered an interesting problem. This chunk of code: string aqs = SerialDevice.GetDeviceSelector(); var dis = await DeviceInformation.FindAllAsync(aqs); var port = await SerialDevice.FromIdAsync(dis[0].Id); if (port != null) { port.BaudRate = 9600; port.DataBits = 8; port.StopBits = SerialStopBitCount.One; port.Parity = SerialParity.None; port.Handshake = SerialHandshake.None; port.ReadTimeout

UWP check the current page for name or instance

社会主义新天地 提交于 2019-12-06 04:29:16
问题 In my UWP app I am launching from protocol or toast. In the onactivated method I want to check whether the apps' mainview is open or which page it is showing. All from the App.xaml.cs I wanna do something like: If Mainpage is not showing --> Navigate(typeof(MainPage)); or If main window is not open since i am coming from protocol or toast launch open frame and navigate to mainpage. not sure how to go about it. 回答1: So I'm checking for var frame = Window.Current.Content as Frame; if (frame !=

Couldn't find the required information in the lock file. Make sure you have .NETCore,Version=v5.0/win10-anycpu mentioned in your targets

我怕爱的太早我们不能终老 提交于 2019-12-06 04:25:06
I'm working on a Windows 10 universal app. The aim was to have a JS front end connecting to a C# library for the heavy lifting. Though when I add the reference and trey to compile I get the following error Couldn't find the required information in the lock file. Make sure you have .NETCore,Version=v5.0/win10-anycpu mentioned in your targets. I've looked around and in a few cases the solution has been to update Visual Studio and the NuGet packages which I have done. Any suggestions would be great, Thanks Just change build configuration to x86 or ARM and it should work. Any CPU is not supported

How to use SearchBox in Windows 8.1 by loading the results using a async method

独自空忆成欢 提交于 2019-12-06 04:06:09
问题 I am using a SearchBox to list some items that are obtained from the server. The call to the server is happening in a async method. I am getting an exception An exception of type 'System.InvalidOperationException' occurred WinRT information: A method was called at an unexpected time. My XAML <SearchBox Name="SearchBox" Style="{StaticResource AccountSearchBoxStyle}" Grid.Row="1" Margin="120,0,0,0" HorizontalAlignment="Left" SuggestionsRequested="SearchBox_SuggestionsRequested"

How to run a Windows 10 IOT app locally?

若如初见. 提交于 2019-12-06 03:44:28
问题 Is there a way to allow a normal Windows 10 installation to run Windows 10 IOT apps for debugging purposes? Right now when I set the architecture from ARM (Raspberry Pi 3) to x64 (Local machine) I get the following error message when I start a debug session: I've read here that it's got something to do with 'embedded mode' but I can't find any information anywhere about it and the group policy does not appear to contain anything about enabling embedded mode... Help is greatly appreciated!

Sharing target Universal Apps Template10 approach in Windows 10

寵の児 提交于 2019-12-06 03:36:57
My app is a target app for sharing and am facing issues when the app is running and the user wants to share content. I can't use a frame from the running application because then i get a "marshalling thread" exception. The application called an interface that was marshalled for a different thread.\r\n\r\nFailed to initialize the application's root visual My OnStartAsync method in App.xaml.cs looks like this. public override async Task OnStartAsync(StartKind startKind, IActivatedEventArgs args) { switch (DetermineStartCause(args)) { // other cases case AdditionalKinds.Other: if (args is

No installed components were detected. Cannot resolve TargetName HighContrastBorder - UWP Windows 10

帅比萌擦擦* 提交于 2019-12-06 03:02:27
问题 My CommandBar has its IsOpen property set to true in XAML and therefore the is text for each button is visible as I want the descriptions to remain visible. When I click on ellipses button, it hides the text and the second time I click on it, I get the following error: No installed components were detected. Cannot resolve TargetName HighContrastBorder . There is something awkward going on with the UI and maybe it's related to this but I can't figure out what or why: As you can see my buttons'

Cannot connect to StreamSocketListener

断了今生、忘了曾经 提交于 2019-12-06 02:59:52
I'm trying to connect to a StreamSocketListener in my Windows 10 app. This is working if the client socket is inside the same app. But if I try to connect from another application (e.g. Putty) it doesn't work. After a few seconds putty says "Network Error: Connection Refused". Here is my sample code: public sealed partial class MainPage : Page { private StreamSocketListener listener; public MainPage() { this.InitializeComponent(); listener = new StreamSocketListener(); listener.ConnectionReceived += Listener_ConnectionReceived; listener.BindServiceNameAsync("12345").AsTask().Wait(); } private

ContentDialog not aligning to center on UWP

橙三吉。 提交于 2019-12-06 02:41:16
From what I know, ContentDialog 's default behavior should be to have it centered on PC and aligned to top on mobile, but in my case I have it aligned to top even on PC and I don't understand what's going on. I'm creating it using code-behind, and this is a snippet of the code that I'm using: // Creates the password box var passwordBox = new PasswordBox {IsPasswordRevealButtonEnabled = true, Margin = new Thickness(5)}; // Creates the StackPanel with the content var contentPanel = new StackPanel(); contentPanel.Children.Add(new TextBlock { Text = "Insert your password to access the application"