Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MartinZikmund/25e13551a33a3ae389bc0835f3c928fd to your computer and use it in GitHub Desktop.
Save MartinZikmund/25e13551a33a3ae389bc0835f3c928fd to your computer and use it in GitHub Desktop.
private void RefreshDisplayInformation()
{
var info = Windows.Graphics.Display.DisplayInformation.GetForCurrentView();
var type = info.GetType();
var typeInfo = type.GetTypeInfo();
var propertyInfos = typeInfo.GetProperties();
var properties = propertyInfos.Select(p => new PropertyInformation() { Name = p.Name, Value = SafeGetValue(p, info) }).ToArray();
PropertyListView.ItemsSource = properties;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment