Toggle the details-on-demand panel on\off

1
2
3
4
if (Document.ActivePageReference.DetailsOnDemandPanel.Visible == False):
Document.ActivePageReference.DetailsOnDemandPanel.Visible = True
else:
Document.ActivePageReference.DetailsOnDemandPanel.Visible = False