2
私はリボンクラスでアクセスできるSetting.settingsファイルにブール値のプロパティSettings.Default.MarkAsRead
を持っています。私がしたいのは、このプロパティの値に応じて、バックステージセクションのチェックボックスの値を設定することです。また、ユーザーがそれを変更した場合は、新しい値を保存する必要があります。Officeアドインのバックステージのチェックボックスの値にアクセスするには?
どうにかできますか?
これは私の(簡体字)xmlです:私はRibbon_Load
メソッドからのXML要素にアクセスする方法を見つけることができませんでしたので、私は私のリボンクラスのブールプロパティを作成しました
<?xml version="1.0" encoding="UTF-8"?>
<customUI onLoad="Ribbon_Load"
xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<backstage>
<tab id="MyBackstageSection" label="MyBackstageSection"
columnWidthPercent="30" insertAfterMso="TabInfo" visible="true" >
<firstColumn>
<group id="grpOne" label="Configuration">
<bottomItems>
<checkBox id="markAsRead" label="Mark as read"
getPressed="markAsRead_GetPressed" />
<button id="save" label="Save Preferences" onAction="save_Click"/>
</bottomItems>
</group>
</firstColumn>
</tab>
</backstage>
</customUI>