I have so UnboundFields and have a have overriden so that there is a togglebuttion with a contextmenu. When I right click, on one of the UnboundField lables, it immediately moves to the end of the list. Is there some way to disable this. I have tried capturing the ButtonDown and PreviewButtonDown
Hello,
Thank you for your post. I have been looking into it, but it seems like that I am missing something in your scenario, so if this is still an issue for you, could you please send an isolated sample project, where the issue is reproduced, so I can investigate it further for you.
Looking forward for your reply.
I have the following XAML:
<Style x:Key="LabelPresenterBroker" TargetType="{x:Type igDP:LabelPresenter}" BasedOn="{StaticResource {x:Type igDP:LabelPresenter}}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <ToggleButton Name="tb" Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Height="23" Click="AssignToBatch_ToggleButton_Click" > <ToggleButton.ContextMenu> <ContextMenu> <MenuItem Click="AssignToBatch_MenuItem_Click"> <MenuItem.Icon> <StackPanel Orientation="Horizontal"> <Image Source="/Fox.UI.Resource;component/Images/arrow_right.png" /> <Label Content="Assign to Batch" VerticalAlignment="Center" /> </StackPanel> </MenuItem.Icon> </MenuItem> <MenuItem Click="Sort_MenuItem_Click"> <MenuItem.Icon> <StackPanel Orientation="Horizontal"> <Image Source="/Fox.UI.Resource;component/Images/arrow_right.png" /> <Label Content="Sort" VerticalAlignment="Center" /> </StackPanel> </MenuItem.Icon> </MenuItem> </ContextMenu> </ToggleButton.ContextMenu> </ToggleButton> </ControlTemplate> </Setter.Value> </Setter>
When I click, I have no problem, the click event works fine. WHen I right click for the context menu first time,
I end up at the sent of the records.
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.