Skip to content

Window Command ItemSource Binding #2402

@mtaulbee

Description

@mtaulbee

What steps will reproduce this issue?

When I use the following code in Version 1.2.0 and up, it does not create the LeftWindowCommands buttons like it used to.

<controls:MetroWindow.Resources>
    <DataTemplate x:Key="ModuleCommandTemplate">
        <Button Content="{Binding ModuleDisplayName}"
                Command="{x:Static cmd:ApplicationCommands.NavigateCommand}"
                CommandParameter="{Binding}"
                Width="Auto"
                Height="50"
                HorizontalContentAlignment="Stretch"
                VerticalAlignment="Center"
                VerticalContentAlignment="Center"
                FontSize="16">
        </Button>
    </DataTemplate>
</controls:MetroWindow.Resources>
<controls:MetroWindow.LeftWindowCommands>
    <controls:WindowCommands ItemsSource="{Binding ModuleNames}"
                             ItemTemplate="{StaticResource ModuleCommandTemplate}">
    </controls:WindowCommands>
</controls:MetroWindow.LeftWindowCommands>

Environment

  • MahApps.Metro __v1.2 and up
  • Windows 10
  • Visual Studio __2015
  • .NET Framework 4.6

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions