locked
Binding Problem

    Question

  • HI 

    I'm a newbie to XAML

    When I use Windows Azure table storage, I need to use DynamicTableEntity class which is:

        public sealed class DynamicTableEntity : ITableEntity
        {
            public DynamicTableEntity();
            public DynamicTableEntity(string partitionKey, string rowKey);
            public DynamicTableEntity(string partitionKey, string rowKey, string etag, IDictionary<string, EntityProperty> properties);
    
            public string ETag { get; set; }
            public string PartitionKey { get; set; }
            public IDictionary<string, EntityProperty> Properties { get; set; }
            public string RowKey { get; set; }
            public DateTimeOffset Timestamp { get; set; }
    
            public void ReadEntity(IDictionary<string, EntityProperty> properties, OperationContext operationContext);
            public IDictionary<string, EntityProperty> WriteEntity(OperationContext operationContext);
        }

    I would like to bind Properties[1].Value.StringValue to a text

    so I write the code below:

     <ListView x:Name="lstEntities" HorizontalAlignment="Left" Height="504" Margin="34,153,0,0" VerticalAlignment="Top" Width="1267">
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Vertical" Margin="5,0">
                            <TextBlock Text="{Binding Path=Properties[1].Value.StringValue}" FontSize="24" FontWeight="Bold"/>
                            <TextBlock Text="{Binding PartitionKey}" TextWrapping="Wrap" />
                          
                        </StackPanel>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>

    But it doesn't work..

    What should I do?

    Thanks


    Please mark post as answered if it helped!


    • Edited by Yuan2013 Sunday, March 9, 2014 12:04 PM
    Sunday, March 9, 2014 11:58 AM

Answers