2012-01-27 67 views

回答

0

您可以创建一个风格,你的按钮和使用转换器做翻译从英语到西班牙语。在下面的例子中,titleTranslator转换器用于翻译这个按钮的文本。

<Style x:Key="myStyle" TargetType="{x:Type Button}"> 
    <Setter Property="Template"> 
     <Setter.Value> 
      <ControlTemplate TargetType="{x:Type Button}"> 
       <Border CornerRadius="6 6 0 0" VerticalAlignment="Center" Margin="5"> 
        <TextBlock Text="{Binding Converter={StaticResource titleTranslator}}" FontSize="44" FontWeight="Bold" Foreground="{Binding Foreground, Converter={StaticResource brushConverter}}" /> 
       </Border> 
      </ControlTemplate> 
     </Setter.Value> 
    </Setter> 
</Style> 
+0

谢谢!但我问了MessageBox窗口http://msdn.microsoft.com/es-es/library/system.windows.forms.messagebox(v=vs.80).aspx – 2012-01-28 01:37:28

2

您无法本地化消息框按钮。他们遵循操作系统的语言。可能会有一些Win32 API入侵,但我对这些没有经验。