Beispiel #1
0
        private static void RenameRadioButton(RadioButton radioButton)
        {
            object value = radioButton.GetValue(CultureKey.CultureResKey);

            if (value != null)
            {
                string replacement = RManager.GetCultureWord((string)value);
                if (!string.IsNullOrEmpty(replacement))
                {
                    radioButton.Content = RManager.GetCultureWord((string)value);
                }
            }
        }
Beispiel #2
0
        private static void RenameLabel(Label label)
        {
            object value = label.GetValue(CultureKey.CultureResKey);

            if (value != null)
            {
                string replacement = RManager.GetCultureWord((string)value);
                if (!string.IsNullOrEmpty(replacement))
                {
                    label.Content = RManager.GetCultureWord((string)value);
                }
            }
        }
Beispiel #3
0
        private static void RenameTextBlock(TextBlock textBlock)
        {
            if (textBlock.Inlines.Count > 0)
            {
                InlineRenamer(textBlock.Inlines);
            }
            object value = textBlock.GetValue(CultureKey.CultureResKey);

            if (value != null)
            {
                string replacement = RManager.GetCultureWord((string)value);
                if (!string.IsNullOrEmpty(replacement))
                {
                    textBlock.Text = replacement;
                }
            }
        }