Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in SidebarController.IsOpen #41

Open
corliss opened this issue Jan 20, 2016 · 0 comments
Open

Bug in SidebarController.IsOpen #41

corliss opened this issue Jan 20, 2016 · 0 comments

Comments

@corliss
Copy link

corliss commented Jan 20, 2016

Looks like the code has the sense of the boolean inverted. If I set IsOpen= true, the menu should open, not close.

    public bool IsOpen
    {
        get { return _sidebar.IsOpen; }
        set
        {
            _sidebar.IsOpen = value;
            if (_sidebar.IsOpen)
                CloseMenu();
            else
                OpenMenu();
        }
    }

Also, setting _sidebar.IsOpen prevents the opening. So the code should simply read:

    public bool IsOpen
    {
        get { return _sidebar.IsOpen; }
        set
        {
            if (value)
                _sidebar.OpenMenu();
            else
                _sidebar.CloseMenu();
        }
    }

Is this correct?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant