0

表示されるテキストを選択できるように、ListView のカスタム ItemContainerStyle を作成しようとしています。ItemsSource を に設定しようとしていList<string>ます。List<Person>(プロパティを使用して)にバインドしている場合、私はNameできる

<ListView.ItemContainerStyle>
    <Style TargetType="{x:Type ListViewItem}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListViewItem">
                  <StackPanel>
                    <TextBox Text="{Binding Path=Name}">
                  </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ListView.ItemContainerStyle>

のバインディングを指定するにはどうすればよいList<T>ですか?

4

1 に答える 1

1

ただ<TextBox Text="{Binding Mode=OneWay}">やります。

于 2012-05-28T05:10:32.703 に答える