4 Answers, 1 is accepted
I suppose that you are talking about TextBox controls, not TextBlock. The TextBox hides its selection when it has no focus. The menu items get the focus when they are displayed, hence the selection is not visible. Unfortunately you cannot change this behavior of the menu.
Kind regards,
Valeri Hristov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
public void RadContextMenu_Opened(object sender, RoutedEventArgs e)
{
RadContextMenu menu = (RadContextMenu)sender;
GridViewCell cell = menu.GetClickedElement<GridViewCell>();
if (cell.Content.GetType().Equals(typeof(TextBox))) {
((TextBox)cell.Content).LostFocus += new RoutedEventHandler(CellTextBox_LostFocus);
((TextBox)cell.Content).Focus();
}
}
void CellTextBox_LostFocus(object sender, RoutedEventArgs e)
{
((TextBox)sender).LostFocus -= CellTextBox_LostFocus;
((TextBox)sender).Focus();
}
public void RadContextMenu_ItemClick(object sender, RadRoutedEventArgs e)
{
RadContextMenu menu = (RadContextMenu)sender;
GridViewCell cell = menu.GetClickedElement<GridViewCell>();
if (cell.Content.GetType().Equals(typeof(TextBox))) {
((TextBox)cell.Content).Focus();
}
}