瀏覽代碼

Merge pull request #866 from KvanTTT/master

TwoWay binding by default for IsExpanded property in Expander control
Steven Kirk 8 年之前
父節點
當前提交
a4b3377b13
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/Avalonia.Controls/Expander.cs

+ 2 - 1
src/Avalonia.Controls/Expander.cs

@@ -31,7 +31,8 @@ namespace Avalonia.Controls
             AvaloniaProperty.RegisterDirect<Expander, bool>(
                 nameof(IsExpanded),
                 o => o.IsExpanded,
-                (o, v) => o.IsExpanded = v);
+                (o, v) => o.IsExpanded = v,
+                defaultBindingMode: Data.BindingMode.TwoWay);
 
         static Expander()
         {