The very first build with 453 shows dozen of regressions in my application ... Most of them are linked to refresh issues, I'll check them carrefuly tomorrow.
However, here is a very simple one:
I was using this code with 426 to display a scale bar; it does not longuer work unless I force a refresh (by minimizing+maximizing the application)
Sorry for making your upset with the new release. Can you try the following code which provides 2 solutions and both of them should work? private void ShowHideLayer_Load(object sender, EventArgs e) { winformsMap1.MapUnit = GeographyUnit.DecimalDegree; winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean);
winformsMap1.CurrentExtent = new RectangleShape(-139.2, 92.4, 120.9, -93.2); winformsMap1.Refresh(); }
private void cbkShowLayer_CheckedChanged(object sender, EventArgs e) { // This is the first solution. //winformsMap1.AdornmentOverlay.IsVisible = cbkShowLayer.Checked; //winformsMap1.Refresh(winformsMap1.AdornmentOverlay);
// The second solution should work. winformsMap1.AdornmentOverlay.Lock.EnterWriteLock(); try { winformsMap1.AdornmentOverlay.IsVisible = cbkShowLayer.Checked; } finally { winformsMap1.AdornmentOverlay.Lock.ExitWriteLock(); } winformsMap1.Refresh(); }
I am still very concerned about why the solution#2 does not work in your enviroment, it should work exactly the same with previous versions to keep its compability.
If your application is in SingleThreaded mode(default threading mode), just feel confortable to change it to solution1 ,while if you are using the Multi-threadind mode, the lock-unlock system should be kept to guarantee its theading safety.