Anyone know why the menu item binding does not work ?
<ToggleButton Name="toggleButton" Checked="checkBoxPublish_Checked" >
<ToggleButton.Resources>
<converters:BooleanToHiddenVisibility x:Key="boolToVis"/>
</ToggleButton.Resources>
<Grid>
<Image Height="auto" HorizontalAlignment="Left" Margin="5" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="auto" />
<Viewbox >
<TextBlock Text="Blocked" Opacity="0.7" Foreground="Red" Visibility="{Binding Path=IsChecked, ElementName=toggleButton, Converter={StaticResource boolToVis}}"/>
</Viewbox>
</Grid>
<ToggleButton.ContextMenu>
<ContextMenu StaysOpen="True" >
<MenuItem x:Name="menuItemBlock" Header="Block" Click="menuItemClick" IsCheckable="True" IsChecked="{Binding ElementName=toggleButton, Path=IsChecked}"/>
<MenuItem x:Name="menuItemIgnorePtz" Header="Ignore Ptz" Click="menuItemClick" IsCheckable="True" />
</ContextMenu>
</ToggleButton.ContextMenu>
</ToggleButton>