Microsoft.Silverlight.Testing.Controls.TreeViewItem.HandleUpKey C# (CSharp) Method

HandleUpKey() private method

Try moving the focus up from the selected item.
private HandleUpKey ( ) : bool
return bool
        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;
        }