请问为啥运行结果弹不出菜单内容
<Window x:Class="BdmsPlatform.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Name="frmMainWindow" Height="600" Width="800">
<Grid Name="grdMain">
<Grid.RowDefinitions>
<RowDefinition Name="grdRow0" Height="30"></RowDefinition>
<RowDefinition Name="grdRow1" Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Menu HorizontalAlignment="Right" Name="menuMain"
Height="{Binding ElementName=grdRow0, Path=Height}"
Grid.Row="0" Grid.Column="0"
Width="{Binding ElementName=frmMainWindow, Path=Width}"
Margin="0,0,-8,0"
>
<Menu.ItemTemplate>
<DataTemplate>
<MenuItem ItemsSource="{Binding Path=Items}" Height="{Binding ElementName=menuMain,Path=Height}" FontSize="15"
Header="{Binding Path=Title}">
<MenuItem.ItemTemplate>
<DataTemplate>
<MenuItem Height="{Binding ElementName=menuMain,Path=Height}" FontSize="15"
Header="{Binding Path=Title}">
</MenuItem>
</DataTemplate>
</MenuItem.ItemTemplate>
</MenuItem>
</DataTemplate>
</Menu.ItemTemplate>
</Menu>
</Grid>
</Window>
public partial class MainWindow : Window
{
// public BdmsInterface.MenuItem[] menus { get; set; }
public MainWindow()
{
InitializeComponent();
BdmsInterface.MenuItem[] menus = new BdmsInterface.MenuItem[]{
new BdmsInterface.MenuItem("系统","S"),
new BdmsInterface. MenuItem("项目","X"),
new BdmsInterface.MenuItem("工具","T")
};
menus[0].Items.Add(new BdmsInterface.MenuItem("退出", "X"));
this.menuMain.ItemsSource = menus;
}
}
运行后,出现主菜单(能看见“系统”一级的菜单)
其中“系统”后面有个三角符号,表示子菜单内容也有了,但是点击“系统”后,没有子菜单弹出,求解?
...全文
相关推荐
android 左侧菜单 右侧内容
android 左侧菜单 右侧内容 有代码
左边菜单,右边内容
android ui设计 android源码 android开源项目 android项目代码
左侧菜单栏控制右侧页面内容切换
本demo所需技术:jQuery+Bootstrap 本demo所用工具:IDEA 本demo主要实现功能: 1. 左侧菜单栏切换右侧页面内容 2. boostrap弹框内容的显示
pycharm运行程序时看不到任何结果显示的解决
原因是用程序选择了console来运行,取消console方法如下: Run->Edit Configurations 取消run with python console的勾 补充拓展:解决pycharm运行后不显示run的结果问题 1:函数结果未通过print进行输出,修改后:print (函数名()) 2:取消Run with python console 以上这篇pycharm运行程序时看不到任何结果显示的解决就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持软件开发网。 您可能感兴趣的文章:postman和
layui实现左侧菜单点击右侧内容区显示
主要为大家详细介绍了layui实现左侧菜单点击右侧内容区显示,具有一定的参考价值,感兴趣的小伙伴们可以参考一下


