Note that there are some explanatory texts on larger screens.

plurals
  1. POWP7 Toolkit: Open ContextMenu from ApplicationBar (contextmenu not displayed)
    primarykey
    data
    text
    <p>I tried to open the ContextMenu from the applicationbar using the "ContextMenu.IsOpen()" method which will run on the event "ApplicationBarIconButton_Click". On the first button click, you see there's s.th. happening/opening. But the ContextMenu is not display correctly. It seems invisible, only the top border is displayed. On second button click everything's fine. I am using the current version of WP7 Toolkit.</p> <p>XAML</p> <pre><code>... &lt;Grid x:Name="ContentPanel" Margin="12,-16,12,0"&gt; &lt;ScrollViewer&gt; &lt;i:Interaction.Triggers&gt; &lt;i:EventTrigger EventName="Loaded"&gt; &lt;ec:GoToStateAction StateName="VisualState"/&gt; &lt;/i:EventTrigger&gt; &lt;/i:Interaction.Triggers&gt; &lt;toolkit:ContextMenuService.ContextMenu&gt; &lt;toolkit:ContextMenu IsZoomEnabled="True" x:Name="ctxContextMenu" Margin="0" CacheMode="BitmapCache" BorderThickness="2"/&gt; &lt;/toolkit:ContextMenuService.ContextMenu&gt; &lt;StackPanel Orientation="Vertical"&gt; ... </code></pre> <p>XAML of AppBar:</p> <pre><code>&lt;phone:PhoneApplicationPage.ApplicationBar&gt; &lt;shell:ApplicationBar IsVisible="True" IsMenuEnabled="False"&gt; &lt;shell:ApplicationBarIconButton Click="btnExternVisit_Click" IconUri="/Images/visit.png" Text="Externe Links"/&gt; &lt;/shell:ApplicationBar&gt; &lt;/phone:PhoneApplicationPage.ApplicationBar&gt; </code></pre> <p>VB.NET:</p> <pre><code>Dim ctxItem As New MenuItem() With {.Header = "Text"} AddHandler ctxItem.Tap, Sub() Dim showWeb As New WebBrowserTask() showWeb.Uri = New Uri("uri") showWeb.Show() End Sub ctxContextMenu.Items.Add(ctxItem) </code></pre> <p>Here is what it looks like:</p> <p><img src="https://i.stack.imgur.com/dCmY8.png" alt="ContextMenu is not displayed correctly"></p> <p>Thanks in advance</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload