c# to vc

Hi!

hat is this C# Code in VC?

RibbonMenuItem rmi = sender as RibbonMenuItem;

RibbonButton rb = rmi.DataContext as RibbonButton;

if (rb != null && !rb.IsEnabled)

rmi.IsHitTestVisible = false;

Beste Regards

Bernd