请问关于c的具体应用场景有哪些?
- 内容介绍
- 文章标签
- 相关推荐
本文共计200个文字,预计阅读时间需要1分钟。
在WPF中,若想在代码中获取TabControl的角定位置,以便在显示时相应地设置ToolWindow的位置,你可以通过以下步骤实现:
csharp// 创建BuildingInfoWindow实例BuildingInfoWindow buildingInfoWindow=new BuildingInfoWindow();
// 获取TabControl的角定位置Point tabControlPosition=tabControl.TranslatePoint(new Point(0, 0), this);
// 设置ToolWindow的位置buildingInfoWindow.Left=tabControlPosition.X;buildingInfoWindow.Top=tabControlPosition.Y;
这段代码首先创建了一个`BuildingInfoWindow`实例,然后通过`TranslatePoint`方法获取`TabControl`的角定位置,并将其设置为`ToolWindow`的位置。
本文共计200个文字,预计阅读时间需要1分钟。
在WPF中,若想在代码中获取TabControl的角定位置,以便在显示时相应地设置ToolWindow的位置,你可以通过以下步骤实现:
csharp// 创建BuildingInfoWindow实例BuildingInfoWindow buildingInfoWindow=new BuildingInfoWindow();
// 获取TabControl的角定位置Point tabControlPosition=tabControl.TranslatePoint(new Point(0, 0), this);
// 设置ToolWindow的位置buildingInfoWindow.Left=tabControlPosition.X;buildingInfoWindow.Top=tabControlPosition.Y;
这段代码首先创建了一个`BuildingInfoWindow`实例,然后通过`TranslatePoint`方法获取`TabControl`的角定位置,并将其设置为`ToolWindow`的位置。

