我无法在 Modern UI 中为 WPF (vs2013 C#) 启用我的列表框

I can't enable my listBox in Modern UI for WPF (vs2013 C#)

我的主要 window 是一个带有一组 link 的现代标签。每个 link 导航到不同的页面。

<mui:ModernTab Layout="List" Margin="0,0.5,-222,-2" HorizontalAlignment="Left" Width="742">
    <mui:ModernTab.Links>
        <!-- TODO: set @Source -->
        <mui:Link DisplayName="Page 0" Source="Page0.xaml"/>
        <mui:Link DisplayName="Page 1" Source="Page1.xaml"/>
        <mui:Link DisplayName="Page 2" Source="Page2.xaml" />
        <mui:Link DisplayName="Page 3" Source="Page3.xaml"/>
    </mui:ModernTab.Links>
</mui:ModernTab>

第 0 页显示了一个包含多个项目的列表框。

<ListBox HorizontalAlignment="Left" Height="100" Margin="100.5,44,0,0" VerticalAlignment="Top" Width="258" BorderThickness="2" BorderBrush="#FF0C2E17">
    <ListBoxItem Content="CA" Height="21" Width="236"/>
    <ListBoxItem Content="Order" Height="21" Width="236"/>
    <ListBoxItem Content="Year" Height="21" Width="236"/>
    <ListBoxItem Content="Most ordered products" Height="21" Width="236"/>
</ListBox>

问题是,当我将 listBox 放在页面的最顶部或最底部时,它会被启用,但如果我将它移到其他任何地方,它就会被禁用。我一直在寻找解决方案一段时间,但找不到任何东西。任何帮助都会很棒。

您必须设置以下内容:

Topmost="True"

我自己找到了解决方案!

使用属性 Source 效果很好。我在我的主 Window 前面放了一个 imageBox 而没有注意到。我删除了它并且它有效!