internal bool HandleUpKey()
{
// Check if the item should handle the key
if (AllowKeyHandleEvent())
{
// Get the focusable item directly above this item (note that
// this is not necessarily a hierarchical sibling - it could
// also be an ancestor or a descedent of a sibling/ancestor)
ItemsControl control = FindPreviousFocusableItem();
if (control != null)
{
// Try to focus the item unless it's the parent TreeView
return (control == ParentItemsControl && control == ParentTreeView) || control.Focus();
}
}
return false;
}