SL4: How do I change the scale w/o scrolling the canvas?
var st = MapCanvas.RenderTransform as ScaleTransform;
if (null != st)
{
st.CenterX = point.X;
st.CenterY = point.Y;
st.ScaleX = st.ScaleY = scale;
}
Thanks for any hints...
It's been a while since I looked at transforms, but you might want to try setting the RenderTransformOrigin of MapCanvas to new Point(0.5, 0.5)
(or set it in XAML)
精彩评论