WindowsPhone8.1のステータスバーの高さを得る。

WindowsPhone8.1のステータスバーの高さを得る。

PointerPressedイベントで帰ってくるe->GetCurrentPoint(nullptr)は、
ステータスバーを含んだ座標が帰ってきた。RasCurrentPointも調べたが、これは違うようで、DPI補正されてる感じ(^^;…

ということで、

http://blogs.msdn.com/b/amar/archive/2014/05/12/status-bar-in-windows-phone-8-1.aspx

を参考にして、

static StatusBar ^ StatusB =
Windows::UI::ViewManagement::StatusBar::GetForCurrentView();
Rect v= StatusB->OccludedRect;

ステータスバーのオブジェクトをかっぱらってきて、OccludedRectのプロパティを参照する。

これに出てきました。

ここまで来れば、目的は達しました。

あとは、ここを頑張って読む。

https://msdn.microsoft.com/library/windows/apps/windows.ui.viewmanagement.statusbar%28v=win.10%29.aspx

Leave a Reply