wpf-devexpress-dot-xpf-dot-bars-25f4b518.md
Updates a specific bar or ribbon item’s property with a value specified via the UpdateAction.Value.
Namespace : DevExpress.Xpf.Bars
Assembly : DevExpress.Xpf.Core.v25.2.dll
NuGet Package : DevExpress.Wpf.Core
public class UpdateAction :
BarManagerControllerActionBase
Public Class UpdateAction
Inherits BarManagerControllerActionBase
This action updates a specific bar or ribbon item’s property (specified via UpdateAction.Property) with a value specified via the UpdateAction.Value.
The code sample below demonstrates how to change the default ribbon item icon with a custom icon.
<dxp:DocumentCommandProvider>
<dxp:DocumentCommandProvider.RibbonActions>
<dxb:UpdateAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Open}" Property="{x:Static dxb:BarItem.LargeGlyphProperty}" Value="{dx:DXImage Image=ExportToPDF_32x32.png}"/>
...
See Bar Actions to learn more.
The following code snippets (auto-collected from DevExpress Examples) contain references to the UpdateAction class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
wpf-scheduler-customize-context-menus/CS/DXScheduler_PopUpMenuCustomization/MainWindow.xaml#L68
<!--Hide the "New All Day Event" and "New Recurring Event" items-->
<dxb:UpdateAction ElementName="{x:Static Member=dxsch:DefaultBarItemNames.ContextMenu_Items_TimeRuler_Actions_NewAllDayEvent}"
PropertyName="IsVisible"
wpf-scheduler-customize-built-in-ribbon-control/CS/SchedulerRibbonExample/MainWindow.xaml#L26
<!--Disable the Appointment group on the Home tab.-->
<dxb:UpdateAction ElementName="{x:Static dxsch:DefaultBarItemNames.Groups_Home_Appointment }"
PropertyName="IsEnabled"
reporting-wpf-documentpreviewcontrol-customize-toolbar/CS/MainWindow.xaml#L22
<dxb:UpdateAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Print}"
Property="{x:Static dxb:BarItem.LargeGlyphProperty}"
wpf-spreadsheet-customize-context-menu/CS/WpfSpreadsheetMenuCustomization/MainWindow.xaml#L31
<!--Change the Copy item's content.-->
<dxb:UpdateAction ElementName="{x:Static dxsps:DefaultBarItemNames.PopupMenuItem_Copy}"
PropertyName="Content"
wpf-rich-text-editor-customize-context-menu/CS/WpfRichEditorMenuCustomization/MainWindow.xaml#L30
<!--Change the "New Comment" item's content.-->
<dxb:UpdateAction ElementName="{x:Static dxre:DefaultBarItemNames.PopupMenuItem_NewComment}"
PropertyName="Content"
Object DispatcherObject DependencyObject ContentElement FrameworkContentElement DXFrameworkContentElement BarManagerControllerActionBase UpdateAction
See Also