I made work the following code which call an int in a Singleton:
<ListView
SelectedIndex="{Binding Path=DBProviderInstance.CurrentPartIndex, Mode=TwoWay}"
Margin="20,20,20,0"
Grid.Row="0"
Name="ListViewItem"
SelectionMode="Single"
Background="#DCE3E5">
public DBProvider DBProviderInstance
{
get { return DBProvider.Instance; }
}
I had to introduce a session logic so now I use an array of singleton. The xaml.cs code is now like this:
public static DBProvider DBProviderInstance
{
get
{
string session = DBProvider.GetSession().FirstOrDefault();
if (DBProvider.GetInstance(session) == null)
return null;
return DBProvider.GetInstance(session);
}
}
My problem is that now it doesn't react like if it were not binded. However in the launch of the sln, the value is get. Why would this not work?