Binding.IsBinding 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
會有一個值,表示綁定是否仍在啟動。
public:
property bool IsBinding { bool get(); };
public bool IsBinding { get; }
member this.IsBinding : bool
Public ReadOnly Property IsBinding As Boolean
屬性值
true如果結合是啟動狀態;否則,。 false
範例
以下程式碼範例將PropertyName每個 IsBinding 和 Binding 值列印在表單上。
private:
void PrintBindingIsBinding()
{
for each ( Control^ c in this->Controls )
{
for each ( Binding^ b in c->DataBindings )
{
Console::WriteLine( "\n {0}", c );
Console::WriteLine( "{0} IsBinding: {1}",
b->PropertyName, b->IsBinding );
}
}
}
private void PrintBindingIsBinding()
{
foreach(Control c in this.Controls)
{
foreach(Binding b in c.DataBindings)
{
Console.WriteLine("\n" + c.ToString());
Console.WriteLine(b.PropertyName + " IsBinding: "
+ b.IsBinding);
}
}
}
Private Sub PrintBindingIsBinding
Dim c As Control
Dim b As Binding
For Each c In Me.Controls
For Each b in c.DataBindings
Console.WriteLine (ControlChars.CrLf & c.ToString)
Console.WriteLine (b.PropertyName & " IsBinding: " & _
b.IsBinding)
Next
Next
End Sub
備註
當結合符合以下條件時即為有效:
所有屬性都已設定。
使用者沒有打電話 ResumeBinding 或 SuspendBinding 使用 BindingManagerBase 該用戶 Binding 所屬的。
所屬的控制 Binding 權已經建立。