-4

what are these? I am confused with the extra properties in "Binding"

{Binding Path=Customers, Source={StaticResource customerVM}, Mode=TwoWay}
{Binding Path=GetCustomersByNameCommand, Source={StaticResource customerVM}}
{Binding Path=Text, ElementName=tbName}
{Binding Path=DataContext, ElementName=LayoutRoot}
{Binding Path=TotalIncome, Mode=OneTime}

and more of those. What are those? I mean, where are they getting the Mode, Path, etc.. I don't understand.

The only thing I can understand is

{Binding ProperyName}
{StaticResource Anythinghere}
4

1 に答える 1

1

XAML でのバインドは、さまざまな方法で指定できます。

最も簡単な(ショートカット)は

{Binding PropertyName}

これは、

{Binding Path=PropertyName}

これは次と同等です。

<Binding Path="PropertyName" />

Binding実際には、Path、Source、Mode などのさまざまなプロパティを持つクラスです。

WPF でデータをバインドする方法の詳細については、http: //msdn.microsoft.com/en-us/magazine/cc163299.aspx#S2を参照してください。

于 2012-06-22T12:35:49.763 に答える