Hi,
I add some markers to map dynamically run time .
User should be able to edit texts for each marker . So I’ve added TextBox to marker’s content.
Everything works fine but user cannot edit on textbox to edit texts .
This is my code :
var markerOverlay = (SimpleMarkerOverlay)Overlays[MarkerOverlayId];
var marker =
new
Marker(LastMouseClickPosition)
{
ImageSource =
new
BitmapImage(
new
Uri(@
"…\Resources\Images\Icons\point_16.png"
,
UriKind.RelativeOrAbsolute)),
YOffset = 0,
XOffset = 0
};
var content =
new
TextBox
{
BorderThickness =
new
Thickness(0),
Text =
“label”
,
FontSize = 10,
Foreground =
new
SolidColorBrush(Colors.Black),
Margin =
new
Thickness(0, -25, 0, 0),
VerticalAlignment = VerticalAlignment.Top,
MaxLength = 50,Focusable=
true
};
content.Focus();
content.TextChanged -= ContentTextChanged;
content.TextChanged += ContentTextChanged;
marker.Content = content;
markerOverlay.Markers.Add(marker);
Refresh(Overlays[MarkerOverlayId]);
Any idea what’s the problem ?
Is this something related to styles ?
Thanks