One way that I have used to accomplish this with a button to expand / collapse the nav and have it lock open is by binding the style class for the nav container to a session custom property. Clicking the button toggles the session custom property and then the binding toggles between a style class I set up for an expanded nav and the regular nav class.