Microsoft.Phone.Controls.ListPicker.Open C# (CSharp) Method

Open() public method

Opens the picker for selection either into Expanded or Full mode depending on the picker's state.
public Open ( ) : bool
return bool
        public bool Open()
        {
            if (SelectionMode == SelectionMode.Single)
            {
                // On interaction, switch to Expanded/Full mode
                if ((ListPickerMode.Normal == ListPickerMode))
                {
                    if (ExpansionMode == ExpansionMode.ExpansionAllowed && Items.Count <= ItemCountThreshold)
                    {
                        ListPickerMode = ListPickerMode.Expanded;
                    }
                    else
                    {
                        ListPickerMode = ListPickerMode.Full;
                    }
                    return true;
                }
            }
            else
            {
                ListPickerMode = ListPickerMode.Full;
                return true;
            }

            return false;
        }