+ Reply to Thread
Results 1 to 2 of 2

Thread: Add attribute infomation for a new point

  1. #1
    eryu linxi
    Join Date
    Dec 2011
    Posts
    1
    Points
    0
    Answers Provided
    0


    0

    Default Add attribute infomation for a new point

    I want to add a point,and give the point attribute infomation.
    Now I can add the point,and pop up a Board wich can list all its fields.But I cann't save this Textbox's infomation to the point's attribute.
    The following code is part of the Board's code. So how can I do? Please help me!
    Code:
                        <ListBox ItemsSource="{Binding ElementName=MyMap, Path=Layers[ThreatPoints].LayerInfo.Fields}" VerticalAlignment="Top" HorizontalAlignment="Center">
                                <ListBox.ItemTemplate>
                                    <DataTemplate>
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition/>
                                                <ColumnDefinition/>
                                            </Grid.ColumnDefinitions>
                                            <TextBlock Text="{Binding Name}" Grid.Column="0" FontSize="20" Width="100"/>
                                            <TextBox Text="{Binding Value, Mode=TwoWay}" Grid.Column="1" FontSize="20" Width="150"/>
                                        </Grid>
                                    </DataTemplate>
                                </ListBox.ItemTemplate>
                            </ListBox>

  2. #2
    Jennifer Nery

    Join Date
    May 2010
    Posts
    2,449
    Points
    289
    Answers Provided
    51


    0

    Default Re: Add attribute infomation for a new point

    I think you should be using graphic.Attributes as your ListBox.ItemsSource.

    Before adding the graphic to your layer, you can give it default attribute values. Kindly see post# 11 in this thread: http://forums.arcgis.com/threads/217...-Silverlight-4. You can then set your ListBox.ItemsSource = graphic.Attributes.
    Jennifer Nery
    Software Developer
    ArcGIS API for SL/WPF/WP7

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts