I have a Shell holding 2 Views. They both use the same viewmodel, in fact the shell uses the same viewmodel as well. I have 2 buttons in the shell that are supposed to change the visibility of the the 2 views. It appears that even though the command is firing, that the value is being changed and that i have onpropertychanged configured correctly, the view is not being refreshed. I have tried controlling the visibility from the parent shell and from within the view itself.
These are my Commands:
Public ReadOnly Property ShowMinimalistSearchResultsView As ICommand
Get
If _cmdShowMinimalistSearchResultsView Is Nothing Then
_cmdShowMinimalistSearchResultsView = New RelayCommand(AddressOf ShowMinimalistSearchResultsViewExecute)
End If
Return _cmdShowMinimalistSearchResultsView
End Get
End Property
Public ReadOnly Property ShowSearchResultsView As ICommand
Get
If _cmdShowSearchResultsView Is Nothing Then
_cmdShowSearchResultsView = New RelayCommand(AddressOf ShowSearchResultsViewExecute)
End If
Return _cmdShowSearchResultsView
End Get
End Property
These are the CommandExecutes:
Private Sub ShowMinimalistSearchResultsViewExecute()
Me.IsMinimalistSearchResultsViewVisible = True
End Sub
Private Sub ShowSearchResultsViewExecute()
Me.IsMinimalistSearchResultsViewVisible = False
End Sub
This is the visiblity Boolean....
Private _isminimalistsearchresultsviewvisible As Boolean
Public Property IsMinimalistSearchResultsViewVisible As Boolean
Get
Return _isminimalistsearchresultsviewvisible
End Get
Set(ByVal value As Boolean)
_isminimalistsearchresultsviewvisible = value
OnPropertyChanged("IsMinimalistSearchResultsViewVisible")
End Set
End Property
Here is the XAML for the view....
<local:MinimalistSearchResultsView Grid.Row="1"
Visibility="{Binding IsMinimalistSearchResultsViewVisible,Converter={StaticResource DebugConverter}}" />
Currently all i am trying to do is get this one view to show or disappear when i issue the commands. I am using the debug converter to verify whether the visibility is even trying to change; which its not.
Why isnt this working?