In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to customize bubbles on wpf in the secondary development of TE. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
In the CS development of TE, winform or wpf can be used for development, and the language used is the development of Candlescope WPF, which can achieve the floating translucent effect that can not be achieved in winform, and some of the effects that come with te can be improved.
The pop-up bubble on the te is realized by the api of te itself, but the disadvantage of the bubble is that the transparency of the bubble can not be set, the shape of the bubble can not be changed, and the information in the bubble should be added according to the requirements of te.
Since in wpf, you can float the window on te, you can customize a bubble, the controls on wpf can also set transparency, and you can also set the shape of the control. According to the mouse click event in te, you can dynamically control the display and hiding of bubbles and change the information in the bubbles.
The first way is to fix the position of the bubble, which sets the position of the bubble according to the pixels on the wpf interface.
The second way is that the bubble moves with the objects, labels, models, etc. in the te to achieve the effect of following the display information.
Let's talk about how to implement this:
First of all, get the longitude and latitude position of the object. In the Window interface, there is a PixelFromWorld method, which can obtain the pixel coordinates of the 3D window according to the longitude and latitude.
The pixel coordinates of the 3D window need to be mathematically switched with the coordinates of the wpf interface. This is the way to add and subtract.
The position of the pop-up bubble can be displayed to the position of the three-dimensional object. Next, to move in the location of the map, you can use the onframe event in te to dynamically move the position of the pop-up bubble to achieve the effect of following the object.
When the objects in the map are out of the range of the 3D window, control that the bubbles no longer display, or float out of the interface.
According to the above ideas, you can achieve the effect of custom bubbles, as shown in the following figure.
Thank you for reading! This is the end of the article on "how to customize bubbles on wpf in the secondary development of TE". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.