This example shows how to hide a BarEditItem's caption even if the control is not empty.
In versions 2011 vol 2 and 2012 vol 1, this functionality can be implemented by overriding the {dxbt:BarEditItemThemeKeyExtension ResourceKey=Template} control template. In this template, bind the Visibility property of the "PART_Content" element to a custom property in the following manner:
[XAML]<dxc:MeasurePixelSnapperContentControlx:Name="PART_Content"Visibility="{Binding Path=Link.(dxm:BarEditItemMode.IsCaptionVisible), ...}".../>
Alternatively, this functionality can be implemented by setting the BarItemLinkControl.ActualShowContentProperty property to False.
Starting with v2012 vol 2 we have changed templates of BarItemLinkControl and its descendants (see the BC1768 breaking change to get more information). In this version, the item's content can be hided by overriding the BarEditItemLinkControl.UpdateLayoutPanelShowContent method in the following manner:
[C#]publicclassMyBarEditItemLinkControl:BarEditItemLinkControl{protectedoverridevoidUpdateLayoutPanelShowContent(){if(LayoutPanel!=null)LayoutPanel.ShowContent=((MyBarEditItemLink)Link).IsCaptionVisible;}}
To learn more on how to implement a similar functionality in Silverlight, refer to the T246748 example.