[UWP] [VB] [XAML] UIElement.Measure给出System.Runtime.InteropServices.COMException [英] [UWP][VB][XAML]UIElement.Measure gives System.Runtime.InteropServices.COMException
问题描述
我有一个UWP应用程序,我在边框元素上使用UIElement.Measure方法。但是,我收到以下信息:
I have a UWP app in which I am using the UIElement.Measure method on a Border element. However, I am receiving the following:
System.Runtime.InteropServices.COMException
错误HRESULT E_FAIL已从通话中返回到COM组件。
我不知道还有什么可以说或者试图帮助找到问题。我之前从未使用过Measure有任何问题,所以我不知道从哪里开始。有任何想法吗?谢谢。
I'm not sure what else to say or what to try to help find the problem. I have never had any problem using Measure before, so I'm not sure where to start. Any Ideas? Thanks.
Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/
Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/
推荐答案
您好,
您确定错误是否与UIElement.Measure方法有关?如果不调用方法,问题是否会消失?你是否重写了从根框架元素测量mehtod以改变孩子们的位置?
是导致错误的许多可能原因。像缺少事件处理程序一样,在未加载布局时调用某些方法。当你调用这个方法?您是否曾尝试在其他时间调用该方法?
Are you sure if the error is related to the UIElement.Measure method? Does the problem disappear if you do not call the method? Are you overriding the Measure mehtod from the root frame element for the changing the position of the children? There are many possible reasons for the error. Like missing event handler, calling some method when the layout is not loaded. When you call the method? Have you tried to call the method in other time?
最好的考虑,
Roy
这篇关于[UWP] [VB] [XAML] UIElement.Measure给出System.Runtime.InteropServices.COMException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!