我收到有关转换为 int 的错误消息。
这是代码:
// create the object containing the page content to be set
PageData pageContent = new PageData(
messagesPageGuid,
TileLayoutIndex.MessagesLayout, // Specify which layout to use for this page
new WrappedTextBlockData(
(Int16)TileMessagesLayoutElementId.Message1,
"This is the text of the first message"),
new WrappedTextBlockData(
(Int16)TileMessagesLayoutElementId.Message2,
"This is the text of the second message"));
这是内部枚举代码:
internal enum TileLayoutIndex
{
MessagesLayout = 0,
};
为什么我会收到错误消息?
更新:
Guid messagesPageGuid = Guid.NewGuid();
// create the object containing the page content to be set
PageData pageContent = new PageData(
messagesPageGuid,
这个 Guid 的东西可能是问题所在