第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

XAML UWP AppBar 沒有響應(yīng)

XAML UWP AppBar 沒有響應(yīng)

C#
慕神8447489 2022-11-13 14:24:44
我的 UWP 應(yīng)用程序出現(xiàn)奇怪的行為。我的頁面頂部有一個帶有三個按鈕的 AppBar。當(dāng)我通過 NavView 導(dǎo)航到我的頁面時,AppBar 沒有響應(yīng),按鈕和菜單(三個點)都沒有響應(yīng),也沒有“鼠標(biāo)懸?!薄.?dāng)我再次導(dǎo)航到該頁面時,它工作正常。據(jù)我所知,當(dāng)我刪除代碼中的“isOpen”屬性時,它似乎可以正常工作。一旦我設(shè)置了屬性(在 C# 或 XAML 代碼中),它在第一次導(dǎo)航時就沒有響應(yīng)<AppBar x:Name="AppBar" IsSticky="True" Margin="0,0,0,0"  IsOpen="True" >  <StackPanel Orientation="Horizontal">    <AppBarButton Label="Reset" Icon="AllApps" Click="ButtonResetGrid" />    <AppBarButton Label="Export" Icon="AllApps" Click="ButtonExport" />    <AppBarButton Label="Refresh" Icon="AllApps" Click="ButtonRefreshCode" />  </StackPanel></AppBar>這是第一次導(dǎo)航到頁面時不工作:第二次導(dǎo)航后(您可以看到鼠標(biāo)懸停):預(yù)期行為也許有人有想法或好的提示。
查看完整描述

2 回答

?
千巷貓影

TA貢獻(xiàn)1829條經(jīng)驗 獲得超7個贊

官方文檔中有備注,只有在升級使用 AppBar 的 Universal Windows 8 應(yīng)用時才應(yīng)該使用 AppBar,并且需要盡量減少改動。對于 Windows 10 中的新應(yīng)用,我們建議改用該CommandBar控件。請嘗試CommandBar如下使用。


<CommandBar>

    <AppBarButton Label="Reset" Icon="AllApps" Click="ButtonResetGrid" />

    <AppBarButton Label="Export" Icon="AllApps" Click="ButtonExport" />

    <AppBarButton Label="Refresh" Icon="AllApps" Click="ButtonRefreshCode" />

    <CommandBar.SecondaryCommands>

        <AppBarButton Icon="Like" Label="Like" />

        <AppBarButton Icon="Dislike" Label="Dislike" />

    </CommandBar.SecondaryCommands>


    <CommandBar.Content>

        <TextBlock Text="Now playing..." Margin="12,14"/>

    </CommandBar.Content>

</CommandBar>

更新


如果你想讓所有 AppBarButtons conllection 離開,你需要像鏈接一樣自定義 CommandBar 樣式。


查看完整回答
反對 回復(fù) 2022-11-13
?
慕森卡

TA貢獻(xiàn)1806條經(jīng)驗 獲得超8個贊

你能試試嗎,因為它可能會起作用:


 <Page.TopAppBar>

        <AppBar x:Name="AppBar" IsSticky="True" Margin="0,0,0,0"  IsOpen="True">

                <StackPanel Orientation="Horizontal">

                    <Button Content="Reset" Width="140" Height="80" Click="ButtonResetGrid_Click"/>

                    <Button Content="Export" Width="140" Height="80" Icon="AllApps" Click="ButtonExport_Click"/>

                    <Button Content="Refresh" Width="140" Height="80" Icon="AllApps" Click="ButtonRefreshCode_Click"/>

                </StackPanel>


        </AppBar>

    </Page.TopAppBar>


查看完整回答
反對 回復(fù) 2022-11-13
  • 2 回答
  • 0 關(guān)注
  • 151 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號