更改自定义任务上按钮的可见性
实际上,我的 Outlook 加载项上有一个运行良好的自定义任务窗格。我的问题是,我想更改我的 customTaskPane 上显示的一个按钮的可见性,但我不知道如何在我的 thisAddin 中执行此操作。
我尝试这样做的代码部分。或许这样更容易理解。
if (person.Role == 1)
{
//Person is SysAdmin no Button display
//How could I change state of my button ??
}
else if (person.Role == 2)
{
//Person is ServiceAdmin display refused button
}
else if (person.Role == 3)
{
//Person is ServiceAgent display refused and considered button when mail is
//not considered and respond button where mail is considered
}
I actually have a custom task pane on my Outlook add-in that works very well. My problem is that I would like to change visibility of one button presents on my customTaskPane, but I don't know how to do that in my thisAddin.
The part of code where I try to do that. Perhaps it's more comprehensible.
if (person.Role == 1)
{
//Person is SysAdmin no Button display
//How could I change state of my button ??
}
else if (person.Role == 2)
{
//Person is ServiceAdmin display refused button
}
else if (person.Role == 3)
{
//Person is ServiceAgent display refused and considered button when mail is
//not considered and respond button where mail is considered
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我解决了我的问题。
如果有人遇到同样的问题,我会提出解决方案。
我将代码放在 userControl.cs 而不是 thisAddin 中,并将“person.Role”信息保存在 currentInformation 上以在 userControl.cs 上检索它
I solved my problem.
I put the solution if anyone had the same problem.
I put the code in userControl.cs instead of thisAddin, and save the "person.Role" information on the currentInformation to retrieve it on the userControl.cs