how to use panorama item selectionchanged

前端 未结 6 1829
情书的邮戳
情书的邮戳 2021-01-28 03:16

I am attempting to detect the current panorama item that a user is currently on and then toggle an application bar icon button isenabled property accordingly. I have not had any

6条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-28 03:33

    there is alternative to switch case.... you can use

    private void PanoramaItemSelectionChanged(object sender, SelectionChangedEventArgs e)
    {
        if (panoramacontrol.selecteditem == xyzpanorama)
        {
            //....................//
        }
    }
    

    where

    • panoramacontrol is name of your Panorama
    • xyzpanorama is name of item in Panorama. for eg "statuses" in your case.

    not to be confused with header as header and name may be different.

提交回复
热议问题