コード例 #1
0
        private void CreateTextboxControl(NameAttribute displayNameAttribute, RequiredAttribute requiredAttribute, Binding b)
        {
            var textItemControl = new ConfigTextControl();

            textItemControl.ConfigItemDisplayName = _localController.GetLocalString(displayNameAttribute.LocalType, displayNameAttribute.DisplayName);
            textItemControl.SetBinding(ConfigTextControl.ConfigItemValueProperty, b);
            textItemControl.WaterMarkText = requiredAttribute != null?_localController.GetLocalStrings <SDGuiStrings>().Mandatory : _localController.GetLocalStrings <SDGuiStrings>().Optional;

            textItemControl.WaterMarkColor = requiredAttribute != null ? (SolidColorBrush)TryFindResource("Color_FadedRed") : (SolidColorBrush)TryFindResource("Color_FadedGray");

            configItemPanel.Children.Add(textItemControl);
        }
コード例 #2
0
        private void CreateTextboxControl(NameAttribute displayNameAttribute, RequiredAttribute requiredAttribute, Binding b)
        {
            var textItemControl = new ConfigTextControl();
            textItemControl.ConfigItemDisplayName = _localController.GetLocalString(displayNameAttribute.LocalType, displayNameAttribute.DisplayName);
            textItemControl.SetBinding(ConfigTextControl.ConfigItemValueProperty, b);
            textItemControl.WaterMarkText = requiredAttribute != null ? _localController.GetLocalStrings<SDGuiStrings>().Mandatory : _localController.GetLocalStrings<SDGuiStrings>().Optional;
            textItemControl.WaterMarkColor = requiredAttribute != null ? (SolidColorBrush)TryFindResource("Color_FadedRed") : (SolidColorBrush)TryFindResource("Color_FadedGray");

            configItemPanel.Children.Add(textItemControl);
        }