Dependency property inside viewmodel in Prism <p>Is there any way to declare dependency property inside viewmodel? I want to declare a dependency property inside viewmodel and change it's value through command. </p> <pre><code>public class MyViewModel : Prism.Windows.Mvvm.ViewModelBase { public bool IsPaneVisible { get { return (bool)GetValue(IsPaneVisibleProperty); } set { SetValue(IsPaneVisibleProperty, value); } } public static readonly DependencyProperty IsPaneVisibleProperty = DependencyProperty.Register("IsPaneVisible", typeof(bool), typeof(MyViewModel), new PropertyMetadata(0)); public ICommand VisibilityChangeCommand { get; set; } public MyViewModel() { VisibilityChangeCommand = new DelegateCommand(OnVisibilityChange); } private void OnVisibilityChange() { IsPaneVisible = !IsPaneVisible; } } </code></pre> <p>Problem is, I am getting some compilation error in IsPaneVisible' getter/setter : "GetValue does not exist in the current context". Is there any alternative way to do this?</p>