在此代码的“if”行上设置断点:
if ((ckbx.Content != null) && (!ckbx.Content.ToString().Contains("(Empty list)")))
{
string groupName = ckbx.Content.ToString();
var contextMenu = new PopupMenu();
contextMenu.Commands.Add(new UICommand("Edit this Group", contextMenuCmd => Frame.Navigate
(typeof(LocationGroupCreator), groupName)));
contextMenu.Commands.Add(new UICommand("Delete this Group", async (contextMenuCmd) =>
{
await SQLiteUtils.DeleteGroupAsync(groupName);
}));
await contextMenu.ShowAsync(args.GetPosition(this));
}
...ckbx.Content 是“(空列表)”,但条件被视为错误 - 条件失败。为什么?