2015-09-15 81 views

回答

0

您只需要爲LocalizationKeys.LocalizeString靜態事件添加處理程序。

以下是本地化DateTimeInput控件文本的示例。

在靜態無效的主要()方法,

DevComponents.DotNetBar.LocalizationKeys.LocalizeString += new DotNetBarManager.LocalizeStringEventHandler(LocalizeString); 

private static void LocalizeString(object sender, LocalizeEventArgs e) 
    { 
     if (e.Key == LocalizationKeys.MonthCalendarTodayButtonText) 
     { 
      e.LocalizedValue = Properties.Resources.MonthCalendarTodayButtonText; 
     } 
     if (e.Key == LocalizationKeys.MonthCalendarClearButtonText) 
     { 
      e.LocalizedValue = Properties.Resources.MonthCalendarClearButtonText; 
     } 

     e.Handled = true; 
    } 

你可以參考官方文檔在這裏。 http://www.devcomponents.com/kb2/?p=523