I have a Class with Shared Properties
This Class holds the Name and ID of the Current User.
It all works fine until I try to databind to the Shared Values.
When I update the Shared Values in Code the Displayed Values stay the same.
But if I update the Displayed Values (In the Text box) the Bound Shared Properties DO update.
Public Class CurrentUser Inherits CommonViewModelBase Private Shared _name As String = "No Name" Private Shared _ID As Integer Private Shared _thisInstance As CurrentUser Public Shared Property name As String Get Return _name End Get Set(value As String) _name = value _thisInstance.OnPropertyChanged(NameOf(name)) End Set End Property Public Shared Property ID As Integer Get Return _ID End Get Set(value As Integer) _ID = value _thisInstance.OnPropertyChanged(NameOf(ID)) End Set End Property Protected Sub New() 'initialization code goes here End Sub Public Shared Function GetCurrentUser() As CurrentUser ' ' initialize object if it hasn't already been done ' If _thisInstance Is Nothing Then _thisInstance = New CurrentUser End If ' ' return the initialized instance ' Return _thisInstance End FunctionEnd Class
Typically the interface will only update when it is changed or instructed to do so from code. So your behavior is what I would expect. When you want to modify the values from code you need to force the UI to update or you modify the values in the UI directly.