timheuer / callisto

A control toolkit for Windows 8 XAML applications. Contains some UI controls to make it easier to create Windows UI style apps for the Windows Store in accordance with Windows UI guidelines.
http://timheuer.com/blog/archive/2012/05/31/introducing-callisto-a-xaml-toolkit-for-metro-apps.aspx
Other
338 stars 108 forks source link

SettingsFlyout, IsOpen=true doesn't work after light dismiss #190

Closed dmitrykm closed 11 years ago

dmitrykm commented 11 years ago

If we use the same instance of SettingsFlyout many times, setting IsOpen=true opens the flyout the first time. If user then light dismisses it, subsequent IsOpen=true doesn't open flyout as property changed callback for IsOpen dp doesn't fire because the property's value is True since the last time flyout was open. Adding IsOpen=false in OnHostPopupClosed helps.

Edit: such reuse will actually work only after commenting out two more lines in OnHostPopupClosed: //_hostPopup.Child = null; and //this.Content = null; though the changes are only for the case of sharing single instance of SettingsFlyout.

timheuer commented 11 years ago

Argh, I thought I fixed this when I fixed #79 but see that was only for Flyout. I'm curious about the previous memory leak statement that you seem to have edited out...where was the leak?

dmitrykm commented 11 years ago

No leaks, sorry that was my mistake, just needed to run GC.