【发布时间】:2020-11-14 00:57:21
【问题描述】:
我正在尝试将我的窗口设置在左下角。
窗口没有标题栏,height 设置为auto 和SizeToContent 是Height 和WindowStartupLocation 是Manual
设置内容后我正在执行这两行代码:
Left = SystemParameters.WorkArea.Width - Width - 2;
Top = SystemParameters.WorkArea.Height - Height - 2;
这两行在 SetupWindow() 函数中
InitializeComponent();
foreach (Caller c in callers)
{
CallerLine callerline = new CallerLine();
Hyperlink link = (Hyperlink)callerline.FindName("link");
ContentControl ccname = (ContentControl)callerline.FindName("ccname");
ContentControl ccnumber = (ContentControl)callerline.FindName("ccnumber");
link.RequestNavigate += hyperlink_RequestNavigate;
ccname.Content = c.Name;
ccnumber.Content = " " + c.PhoneNumber;
spCallers.Children.Add(callerline);
}
SetupWindow();
在将窗口设置到新位置之前,我正在完成所有设置工作!
现在窗口设置在屏幕右侧的某个位置,而不是底部。如何将其设置为右下角?
【问题讨论】:
-
不,正如你所看到的,我所做的与帖子中的答案相同,但它对我不起作用
-
我看不到何时你正在这样做,我想这是问题所在。
-
离底部还有多远?很长的路,或者..
-
它大约在屏幕中间