I am using the mvvm pattern and would like to bind the SideDrawer "IsOpen" property.
I have created a boolean property that raises property changed event and bind to it. With a button I change this property to the opposite value. Initially I set it to true and when the screen opens the sidedrawer is visible like expected. When I hit the button the bound property is changed but it has no effect on the visibility of the sidedrawer? Also when I close the drawer by sliding it down It does not change the bound property? I would expect that it changes to false when I do this.
What am I missing here? Is "IsOpen" a bindable property?
vm (using freshmvvm):
public bool SettingsVisible
{
get
{
return _settingsVisible;
}
set
{
_settingsVisible = value;
RaisePropertyChanged("SettingsVisible");
}
}
SettingsCommand = new Command(SettingsHit); //bound to button command to show/hide sidedrawer
public void SettingsHit() { SettingsVisible = !SettingsVisible; }
xaml:
<telerikPrimitives:RadSideDrawer x:Name="drawer" DrawerLength="200" DrawerLocation="Bottom" DrawerTransitionType="SlideInOnTop" DrawerTransitionFadeOpacity="0.5" IsOpen="{Binding SettingsVisible}">
<telerikPrimitives:RadSideDrawer.MainContent>
etc....