How to get the absolute position of an element?

后端 未结 1 1696
你的背包
你的背包 2020-12-17 14:46

Assume something simple like:


    
        
        

        
相关标签:
1条回答
  • 2020-12-17 15:14

    I think this will work...

    var ttv = MainTextBlock.TransformToVisual(Window.Current.Content);
    Point screenCoords = ttv.TransformPoint(new Point(0, 0));
    
    0 讨论(0)
提交回复
热议问题