IThemeChangingHandler.OnThemeChanged() Method
This method is called when a grid theme is changed.
Namespace: DevExpress.Mobile.DataGrid.Theme
Assembly: DevExpress.Mobile.Grid.v18.2.dll
Declaration
Remarks
Important
This documentation topic describes legacy technology. We no longer develop new functionality for the GridControl and suggest that you use the new DataGridView control instead.
Use this method to force your custom control to react on a theme change. To do this, follow the steps below:
Implement the IThemeChangingHandler interface for your control.
public class CustomButton : IThemeChangingHandler { public CustomButton() { } }
Call the ThemeManager.AddThemeChangedHandler method from your control’s constructor to add the control to the list of delegates handling the ThemeManager.ThemeChanged event.
public class CustomButton : IThemeChangingHandler { public CustomButton() { ThemeManger.AddThemeChagedHandler(this); } }
Implement the OnThemeChanged method for your control. For example, it may call your control’s method used to repaint it.
public class CustomButton : IThemeChangingHandler { public CustomButton() { ThemeManger.AddThemeChagedHandler(this); } void OnThemeChanged(object Sender, EventArgs e) { RepaintButton(); } }