Query Local IP Address

After much digging, I found the information you need using NetworkInformation and HostName. NetworkInformation.GetInternetConnectionProfile retrieves the connection profile associated with the internet connection currently used by the local machine. NetworkInformation.GetHostNames retrieves a list of host names. It’s not obvious but this includes IPv4 and IPv6 addresses as strings. Using this information we can get the … Read more

How to launch my app via NFC tag?

Windows 10 Mobile UWP If you are only targeting Windows 10 Mobile, the 8.1 way still works, given that you get the right App ID. It can be retrieved through: Windows.ApplicationModel.Store.CurrentApp.AppId However, that only works when the app is installed through the store, as the ID is assigned during store association / publishing. In developer … Read more

WinRT and WPF in Windows 8

WinRT is a replacement for the Winapi. The api is native, very unlike WPF that runs as a layer on top of the CLR. It certainly resembles WPF, part of what causes confusion. It adopted the metadata format of managed code, replacing type libraries of old. And uses XAML for UI designs, much like WPF, … Read more

Get Screen Resolution in Win10 UWP App

To improve the other answers even a bit more, the following code also takes care of scaling factors, e.g. for my 200% for my Windows display (correctly returns 3200×1800) and 300% of the Lumia 930 (1920×1080). var bounds = ApplicationView.GetForCurrentView().VisibleBounds; var scaleFactor = DisplayInformation.GetForCurrentView().RawPixelsPerViewPixel; var size = new Size(bounds.Width*scaleFactor, bounds.Height*scaleFactor); As stated in the other … Read more

Let TextBox stretch to fill width in StackPanel

Unfortunately the alternative (DockPanel) isnt available for Metro. You could try a WrapGrid, but I dont know if it’ll solve your problem (Ive never used it). The only real way of doing this is using a Grid as you described: <Grid Width=”400″> <Grid.ColumnDefinitions> <ColumnDefinition Width=”Auto” /> <ColumnDefinition /> </Grid.ColumnDefinitions> <TextBlock Text=”Label” Width=”150″ /> <TextBox Text=”Value” … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)