How do I eliminate rogue “counters” on my Windows Store main page?

我的梦境 提交于 2019-12-02 09:38:13

问题


I have a minimalistic main page - 4 buttons and a Bing Map.

When I run the app, though, I see two rogue "counters" (don't know how else to describe them) in the upper left and upper right. Here's the one on the upper left:

What's causing them, and how can I get rid of them?

BTW, the black vertical strip on the left is "as designed" (no pun intended) - below the "counter" are my four buttons, stacked vertically (I deliberately gave the Bing Map only 80% of the page, not the 100% it greedily grabbed from the git-go).

UPDATE

For Ashok: Here's all there is to the XAML:

<Page
    x:Class="Platypus.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Platypus"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:bm="using:Bing.Maps"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Margin="0,0,0,0">
        <bm:Map Credentials="42314" x:Name="platypusMap" Margin="197,0,0,0" ></bm:Map>
        <Button x:Name="btnOpenImgFiles" Content="Open Images" HorizontalAlignment="Left" Margin="2,48,0,0" VerticalAlignment="Top" Click="btnOpenImgFiles_Click"/>
        <Button x:Name="btnOpenMap" Content="Open Saved Map" HorizontalAlignment="Left" Margin="2,128,0,0" VerticalAlignment="Top" Click="btnOpenMap_Click" />
        <Button x:Name="btnSaveMap" Content="Save Map" HorizontalAlignment="Left" Margin="2,208,0,0" VerticalAlignment="Top" Click="btnSaveMap_Click" />
        <Button x:Name="btnEmailMap" Content="Email Map" HorizontalAlignment="Left" Margin="2,288,0,0" VerticalAlignment="Top" Click="btnEmailMap_Click" />
    </Grid>
</Page>

回答1:


Those are frame rate counters turned on by default in your app.xaml.cs when building for debug:

        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                this.DebugSettings.EnableFrameRateCounter = true;
            }
#endif

You can remove these if you don't want them while debugging. They won't show up by default in release.

--Rob



来源:https://stackoverflow.com/questions/26332111/how-do-i-eliminate-rogue-counters-on-my-windows-store-main-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!