diff --git a/demo/Ursa.Demo/DataTemplates/ToolBarItemTemplateSelector.cs b/demo/Ursa.Demo/DataTemplates/ToolBarItemTemplateSelector.cs index 76e669b..d32c872 100644 --- a/demo/Ursa.Demo/DataTemplates/ToolBarItemTemplateSelector.cs +++ b/demo/Ursa.Demo/DataTemplates/ToolBarItemTemplateSelector.cs @@ -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) diff --git a/src/Ursa/Controls/ToolBar/ToolBar.cs b/src/Ursa/Controls/ToolBar/ToolBar.cs index 08200bc..00c0884 100644 --- a/src/Ursa/Controls/ToolBar/ToolBar.cs +++ b/src/Ursa/Controls/ToolBar/ToolBar.cs @@ -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]; } }