Posts Tagged ‘UWP’

Using VisualStateManager inside DataTemplate

January 6, 2016 Leave a comment

Adaptive layout is really important while we creating windows universal apps and the
recommended way to achieve it is using RelativePanels and VisualStateManager.VisualStateGroups.

On a normal static page [where data is fixed or known for us] we can achieve it easily.
But if we are delaing with adynamic list of data or if we bind thda data to a listbox or any list its bit different.

Important point here is

we can’t directly use Adaptive concept using VisualStateManager.VisualStateGroups with objects placed inside a DataTemplate. Instead, we need to create a User Control and put the DataTemplate content inside it:

A detailed blog with proper explanation is here and it helps me a lot with my development

Categories: Prsnl References Tags: ,

Remove Frame rate counters or black rectangles from corners while running Universal windows app

January 4, 2016 Leave a comment

While i started the development on Universal windows app and when i run the UWP app on Local machine or on emulator i noticed a black rectangle on the top right corners of application like in the image


After reading few more about UWP i  realized that this is indication of frame rates and we can disable it. So to disable this Frame rate indication while running the application what we have to do is disable few lines of code from the  OnLaunched event in App.xaml.cs file

   #if DEBUG
if (System.Diagnostics.Debugger.IsAttached)
this.DebugSettings.EnableFrameRateCounter = true;

Categories: Prsnl References Tags: ,