We are trying to use content zooming in a div and encountered an issue. We are trying to pre-set a zoom level at the time it launch an image. We were trying to follow the MSDN document here (http://msdn.microsoft.com/en-us/library/windows/apps/hh453445.aspx)
but the app throws an exception when we assign a value to it.
this.zoomWindowDiv = document.createElement('div');
this.zoomWindowDiv.style["overflow"] = "auto";
this.zoomWindowDiv.style["-ms-content-zooming"] = "zoom";
this.zoomWindowDiv.style["-ms-scroll-rails"] = "none";
var zoomScalePctX = zoomWindowContainerWidth / (this.initialFrame.right - this.initialFrame.left) * 100;
this.zoomWindowDiv.style["-ms-content-zoom-limit-min"] = zoomScalePctX + '%';
this.zoomWindowDiv.style["-ms-content-zoom-limit-max"] = '100%';
var scaleX = zoomWindowContainerWidth / (this.initialFrame.right - this.initialFrame.left);
var retVal = { left: this.initialFrame.left, top: this.initialFrame.top, zoom: scaleX };
this.zoomWindowDiv.msContentZoomFactor = '0.4';
It doesn't seem to matter whether we use '0.4' or 0.4.
We also tried to do it with the style (this.zoomWindowDiv.style.msContentZoomFactor = '0.4';) and it takes no effect. Any thoughts?
This is the exception thrown:
