Hi,
I am using SignaR in my xamarin forms project.
I am trying to show the ConnectionState of SignalR on my HomePage .
Without success.
Bellow is some code snippet.
**HomePage.xaml** ... <Label x:Name="LblState" Text="{Binding StateString}"></Label> ... **HomePage.cs** ... public HomePage () { InitializeComponent (); BindingContext =homepageviewModel= new HomePageViewModel(); } ... **public class HomePageViewModel : INotifyPropertyChanged** { ... private string _StateString; public string StateString { get { var _StateString = "getString"; return _StateString; } set { if (StateString== value ) return; _StateString = value; OnPropertyChanged(); } } } **public class SignalRServices : ISignalRServices, INotifyPropertyChanged** { ... if (obj.NewState == ConnectionState.Disconnected ) { var _homepageViewModel1 = MyProject.HomePage.homepageviewModel; _homepageViewModel1.StateString = "Disconnected"; } }
Above Code is not working.
What am i doing wrong ?
Thank you for any help.