Corrected array type-mismatch issue in WPF canvas rendering.