Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1700
refresh issue
posted

Hello,

I have a Treemap with an ObservableCollection :

public interface IIntensityMapViewModel
{
ObservableCollection Values { get; set; }

void Refresh(double[,] value);
}

public class IntensityMapViewModel : IIntensityMapViewModel
{

public IntensityMapViewModel()
{
Values = new ObservableCollection();
}

public ObservableCollection Values { get; set; }

public void Refresh(double[,] value)
{
var i = 0;
foreach (var item in value)
{
Values.Add(new Value { Id = i, Name = item.ToString() });
i++;
}
}
}

public class IntensityMapDesignViewModel : IIntensityMapViewModel
{
public ObservableCollection Values
{
get
{
return new ObservableCollection
{
new Value { Id = 0, Name = "1" },
new Value { Id = 1, Name = "2" },
new Value { Id = 2, Name = "3" },
new Value { Id = 3, Name = "4" },
new Value { Id = 4, Name = "5" },
new Value { Id = 5, Name = "6" }
};
}
set { }
}

public void Refresh(double[,] plot)
{
}

}

In use, the map will contains 20 to 276 nodes, that why I put a small minSize.

The refresh method is never called, so there are always 6 nodes displayed.

Could you help me ?

Thanks for your help.

Regards