fix: fix a default binding issue.

This commit is contained in:
rabbitism
2024-02-22 22:57:27 +08:00
parent d5a8064202
commit 8d1660b3ff
2 changed files with 3 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ public class ToolBarItemTemplateSelector: IDataTemplate
{
[!ContentControl.ContentProperty] = new Binding() { Path = "Content" },
[!Button.CommandProperty] = new Binding() { Path = "Command" },
[!ToolBar.OverflowModeProperty] = new Binding(){ Path = "OverflowMode" }
//[!ToolBar.OverflowModeProperty] = new Binding(){ Path = "OverflowMode" }
};
}
if (param is ToolBarCheckBoxItemViweModel cb)
@@ -28,7 +28,7 @@ public class ToolBarItemTemplateSelector: IDataTemplate
{
[!ContentControl.ContentProperty] = new Binding() { Path = "Content" },
[!ToggleButton.IsCheckedProperty] = new Binding() { Path = "IsChecked" },
[!ToolBar.OverflowModeProperty] = new Binding(){ Path = "OverflowMode" }
//[!ToolBar.OverflowModeProperty] = new Binding(){ Path = "OverflowMode" }
};
}
if (param is ToolBarComboBoxItemViewModel combo)

View File

@@ -81,6 +81,7 @@ public class ToolBar: HeaderedItemsControl
var c = p.Child;
if (c != null)
{
// container[ToolBar.OverflowModeProperty] = c[ToolBar.OverflowModeProperty];
container[!ToolBar.OverflowModeProperty] = c[!ToolBar.OverflowModeProperty];
}
}