UWP Windows 10 App memory increasing on navigation

Every time you navigate to a Page, you create a new instance of Page, but the previous Page is not disposed (even if the Page is already in the navigation stack). To prevent multiple allocation of same page, set NavigationCacheMode=”Enabled” attribute to the Page. Also, to minimize the memory allocation, you must override method OnNavigatedTo … Read more

How to execute Process commands (or similar) using a Universal Windows Platform (UWP) App?

There are – limited – ways to achieve similar behavior. You could use LaunchUri to trigger other apps which registered for a certain URI-Scheme. This should work for your webbrowser scenario. More details here: https://msdn.microsoft.com/en-us/library/windows/apps/windows.system.launcher.launchuriasync.aspx You could trigger another app and get results back from it using LaunchForResults. The called app has to support this. … Read more

How to use Acrylic Accent in Windows 10 Creators Update?

CREATOR UPDATE XAML You need to use a component that you put on the background of your app, let’s say a RelativePanel <RelativePanel Grid.Column=”0″ Grid.ColumnSpan=”2″ MinWidth=”40″ x:Name=”MainGrid” SizeChanged=”Page_SizeChanged”/> <RelativePanel Grid.Column=”0″ Width=”{Binding ElementName=MainGrid,Path=Width}” Background=”#28000000″/> <Grid> <!–Having content here, for example textblock and so on–> </Grid> The second RelativePanel is used to set the shadow color above … Read more

UWP Enable local network loopback

For a line of business app use the checknetisolation.exe tool to grant the app a loopback exception. To enable loopback use this command: c:\>checknetisolation loopbackexempt -a -n=<package family name> To disable loopback use this command: c:\>checknetisolation loopbackexempt -d -n=<package family name> The package family name for a UWP app can be found in several places: … Read more

Maximum number of lines for a Wrap TextBlock

Update (for UWP) In UWP Apps you don’t need this and can use the TextBlock property MaxLines (see MSDN) Original Answer: If you have a specific LineHeight you can calculate the maximum height for the TextBlock. Example: TextBlock with maximum 3 lines <TextBlock Width=”300″ TextWrapping=”Wrap” TextTrimming=”WordEllipsis” FontSize=”24″ LineStackingStrategy=”BlockLineHeight” LineHeight=”28″ MaxHeight=”84″>YOUR TEXT</TextBlock> This is all that … 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

How to change Highlight color of the selected ListView item in UWP (Windows 10)

Actually a better way to discover the styling properties is to use Blend. First, open up your page in Blend. Then right click on your ListView and go Edit Additional Templates > Edit Generated Item Container (ItemContainerStyle) > Edit a Copy. Give it a name and hit OK. Now, you have generated the full built-in … 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

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