<esri:MarkerSymbol x:Key="MySymbol"> <esri:MarkerSymbol.ControlTemplate> <ControlTemplate> <TextBox Text="Type here"/> </ControlTemplate> </esri:MarkerSymbol.ControlTemplate> </esri:MarkerSymbol>
Trying to add the value from the textbox in code behind when adding the graphics to the custom map. no success.
How can I set the two way binding for the textbox inside the markersymbol control template?
Thanks very much
<esri:MarkerSymbol x:Key="MySymbol"> <esri:MarkerSymbol.ControlTemplate> <ControlTemplate> <TextBox Text="{Binding Attributes[MyAttribute], Mode=TwoWay, TargetNullValue=Null}"/> </ControlTemplate> </esri:MarkerSymbol.ControlTemplate> </esri:MarkerSymbol>
You can use a MarkerSymbol with TextBox. Maybe create a two-way binding on a graphic.Attribute too if you want TextBox.Text saved per graphic.<esri:MarkerSymbol x:Key="MySymbol"> <esri:MarkerSymbol.ControlTemplate> <ControlTemplate> <TextBox Text="Type here"/> </ControlTemplate> </esri:MarkerSymbol.ControlTemplate> </esri:MarkerSymbol>
I can add a graphic with a textbox marker symbol, but it does not respond to the GraphicsLayer.MouseLeftButtonUp event. I want to allow users to delete the text graphic with GraphicsLayer.Graphics.Remove(e.Graphic) in that event.