'Caliburn.Micro - Value not updating after initial update
I am trying to track the connection status of a server using a TextBlock on my ShellView. The TextBlock updates fine when I launch the program saying "Connected", but I am unable to see me disconnect from the server when I hit the "Disconnect Button". I went ahead and simplified the code to just changing a string value when I hit the button.
Here is my TextBlock on the ShellView.xaml:
<TextBlock Text="{Binding Path=ConnectionString, Mode=OneWay}"></TextBlock>
It is updated on launch of the program using:
public ShellViewModel()
{
setConnectionString("poop");
}
public void setConnectionString(string str)
{
_connectionString = str;
}
This method is fired after a button is pressed.
public void Disconnect()
{
Console.WriteLine("Button Pressed");
setConnectionString("Button Pressed");
}
I know the button press is registering because the console is showing "Button Pressed". Can somebody tell me why the text on the view isn't updating after the button is pressed?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
