Search code examples
windows-phone-8listboxwindows-phoneselectionlonglistselector

Windows Phone ListBox Selector With Click Left


Which component provide us opening multiselection menu with checkboxes via click empty part on left or clicking "Select" button on appbar?

enter image description here

Thanks.


Solution

  • EDIT

    You need to install Windows Phone Toolkit from Nuget Package Manager to have this element. This is LongListMultiSelector. This is not found in the default elements in the WP8 SDK. Use the following instructions.

    Installing Windows Phone Toolkit

    Using Windows Phone Toolkit

    After installing the WPTookit follow the bellow instructions.

    you can enable selection mode by either taping on the empty area of the left side or by pressing a button. If you use a button you can add the following code to enable the selection mode..

    private void btnEnableSelect_Click(object sender, RoutedEventArgs e)
    {
        llms.EnforceIsSelectionEnabled = true;
    }
    

    You can use IsSelectionEnabledChanged event to detect when the selection mode is enable/disabled.

    llms.IsSelectionEnabledChanged += llms_IsSelectionEnabledChanged;
    
    void llms_IsSelectionEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)
    {
        // your task here...
    }