【发布时间】:2015-10-22 04:03:29
【问题描述】:
在我的地图控件中有多个带有按钮的位置。因此,当我单击该位置中的特定按钮时,地图控件中应显示两个单选按钮。
BasicGeoposition bgp = new BasicGeoposition();
AppBarButton rd = new AppBarButton();
bgp.Latitude = loct.lat;
bgp.Longitude = loct.lng;
Geopoint hwPoint = new Geopoint(bgp);
MapControl.SetLocation(rd, hwPoint);
MapControl.SetNormalizedAnchorPoint(rd, new Point(0.5, 0.5));
map1.Children.Add(rd);
通过这种方式,我向地图控件添加了按钮。在那个 rd_click 我应该如何实现在那个位置显示单选按钮
void rd_Click(object sender, RoutedEventArgs e)
{
RadioButton rb = new RadioButton();
RadioButton rb1 = new RadioButton();
StackPanel st = new StackPanel();
st.Children.Add(rb);
st.Children.Add(rb1);
// I want to add this stackpanel to the mapcontrol
}
在按钮附近,两个单选按钮应显示在地图控件中。请帮帮我
错误显示在link
【问题讨论】:
标签: c# xaml windows-phone-8.1 bing-maps