InvalidOperationException in DeviceUtils.DiagonalSize #1042

Closed
schuettecarsten opened this Issue Jun 9, 2016 · 0 comments

Projects

None yet

2 participants

@schuettecarsten
Contributor
schuettecarsten commented Jun 9, 2016 edited

Sometimes whe get an exception on a mobile device when DeviceUtils.IsPhone() is called in a constructor of an InteractionDialog.

Code:

public CheckPinDialog()
{
    this.InitializeComponent();
    if (DeviceUtils.Current().IsPhone())
    {
        this.MaxHeight = 310;
    }
}

Exception/Callstack:

System.InvalidOperationException: InvalidOperation_NoValue. For more information, visit http://go.microsoft.com/fwlink/?LinkId=623485
at SharedLibrary!<BaseAddress>+0x56539b
   at Template10.Utils.DeviceUtils.DiagonalSize(Utils.DeviceUtils.Units units)
   at Maxdome.Uap10.Dialogs.CheckPinDialog..ctor()
   at Maxdome.Uap10.Dialogs.CheckPinDialog..ctor(Uap10.Services.VideoOrderProcess.VideoOrderProcessResult result)
   at Maxdome.Uap10!<BaseAddress>+0xb8f9f1

Device details:
Manufacturer: MicrosoftMDG
Model: RM-1085_12547
Windows: 10.0.10586.318

@JerryNixon JerryNixon closed this Jun 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment