C# VSTO 加载项查找字段功能区
C# VSTO AddIn LookUp field Ribbon
我尝试创建一个带有自定义 XML entries/values 的列表框,它会在用户在编辑框中输入文本后出现。
开发环境是 C# Outlook 13/16 VSTO Plugin。
我的问题是,我只能使用功能区控件访问编辑框或组合框。
使用组合框,我可以添加自定义 XML 条目,例如:
foreach (XmlNode node in source.DocumentElement.SelectNodes("/path/item/value"))
{
RibbonDropDownItem item = Globals.Factory.GetRibbonFactory().CreateRibbonDropDownItem();
string text = node.InnerText;
item.Label = text;
this.comboBoxCompose.Items.Add(item);
//System.Diagnostics.Debug.WriteLine(text);
}
编辑框例如不提供添加项目...
comboBox 对我来说是错误的选择,因为它是一个下拉选择。
有没有办法实现带有自定义结果的列表框,如所附图片所示。我必须将它与其他 API/library 结合使用吗?
如果有人能在这里提供帮助,那就太好了。
不行,没办法。 Fluent UI 提供了一组确定的控件。
您可以在以下系列文章中阅读有关 Fluent UI(又名功能区 UI)的更多信息:
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
作为解决方法,您可以考虑在 Outlook 窗体区域而不是功能区上创建自定义 UI,您可以在其中自由使用任何 .Net 控件。有关详细信息,请参阅 Creating Outlook Form Regions。
我尝试创建一个带有自定义 XML entries/values 的列表框,它会在用户在编辑框中输入文本后出现。 开发环境是 C# Outlook 13/16 VSTO Plugin。 我的问题是,我只能使用功能区控件访问编辑框或组合框。
使用组合框,我可以添加自定义 XML 条目,例如:
foreach (XmlNode node in source.DocumentElement.SelectNodes("/path/item/value"))
{
RibbonDropDownItem item = Globals.Factory.GetRibbonFactory().CreateRibbonDropDownItem();
string text = node.InnerText;
item.Label = text;
this.comboBoxCompose.Items.Add(item);
//System.Diagnostics.Debug.WriteLine(text);
}
编辑框例如不提供添加项目... comboBox 对我来说是错误的选择,因为它是一个下拉选择。
有没有办法实现带有自定义结果的列表框,如所附图片所示。我必须将它与其他 API/library 结合使用吗?
如果有人能在这里提供帮助,那就太好了。
不行,没办法。 Fluent UI 提供了一组确定的控件。
您可以在以下系列文章中阅读有关 Fluent UI(又名功能区 UI)的更多信息:
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
- Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
作为解决方法,您可以考虑在 Outlook 窗体区域而不是功能区上创建自定义 UI,您可以在其中自由使用任何 .Net 控件。有关详细信息,请参阅 Creating Outlook Form Regions。