我已经绑定了@IBOutlet weak var body: UITextView!
@IBOutlet weak var MessageBody: UITextView!
@IBAction func SendEmail(sender: AnyObject) {
let picker = MFMailComposeViewController()
picker.mailComposeDelegate = self
picker.setToRecipients(["reobet@gmail.com"])
picker.setSubject("Hello it's me.")
picker.setMessageBody(body.text, isHTML: true)
presentViewController(picker, animated: false, completion: nil)
}
的中心,但是当我移动时地图不会更新。
MapControl
唯一的解决方案是使其成为双向绑定,但由于它绑定到<maps:MapControl BusinessLandmarksVisible="False"
LandmarksVisible="False"
ColorScheme="Light"
DesiredPitch="50"
PedestrianFeaturesVisible="False"
TrafficFlowVisible="False"
TransitFeaturesVisible="False"
ZoomLevel="20"
RelativePanel.AlignTopWithPanel="True"
RelativePanel.AlignBottomWithPanel="True"
RelativePanel.AlignLeftWithPanel="True"
RelativePanel.AlignRightWithPanel="True"
Center="{Binding CurrentGeoposition.Coordinate.Point, Mode=TwoWay}"
MapServiceToken="{Binding MapServiceToken, Mode=OneTime}"
x:Name="MapControl"/>
,我会被这样的错误所淹没:
Geoposition
有没有办法让这项工作没有所有错误,但没有代码隐藏?
答案 0 :(得分:0)
在你的XAML中试试这个:
Center="{Binding MapCenter, Mode=TwoWay}"
这在你的viewModel:
中public Geopoint MapCenter {
get;
set; }
如果这没有帮助,您可以粘贴viewModel以及XAML吗?