c# - TextBox context menu prevents showing AppBar -


consider following page:

<page ... > <grid>     <textbox acceptsreturn="true" /> </grid>  <page.bottomappbar>     <appbar>         <grid>             <stackpanel orientation="horizontal">                 <button content="test 1" />                 <button content="test 2" />             </stackpanel>         </grid>     </appbar> </page.bottomappbar> </page> 

so, textbox , bottom application bar. now, when run store application on desktop computer, way know activate bar right-click in window. however, textbox built-in context menu shown, preventing bar activation. when program starts, , no actions done in textbox, application bar can activated right-click.

is there way show application bar in such situation?

you can use contextmenuopening event of textbox. open bottom bar in event.

private void textbox_contextmenuopening_1(object sender, contextmenueventargs e) {     bottomappbar.isopen = true;     e.handled = true; //true if don't want show context menu of textbox. } 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -