摘要:
主要用到ContextMenu类,对于任何的控件都可以进行对ContextMenu属性的操作进行设置右键菜单的功能.xaml代码如下:<Window x:Class="右键菜单.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350 阅读全文
摘要:
double x = SystemParameters.WorkArea.Width;//得到屏幕工作区域宽度double y = SystemParameters.WorkArea.Height;//得到屏幕工作区域高度double x1= SystemParameters.PrimaryScreenWidth;//得到屏幕整体宽度double y1 = SystemParameters.PrimaryScreenHeight;//得到屏幕整体高度this.Width = x1;//设置窗体宽度this.Height = y1;//设置窗体高度 阅读全文