Ejemplo n.º 1
0
        private void CreateMarkdownControl(NameAttribute displayNameAttribute, RequiredAttribute requiredAttribute, Binding b)
        {
            var markdownItemControl = new ConfigMarkdownControl(_localController.GetLocalStrings <SDGuiStrings>());

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

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

            configItemPanel.Children.Add(markdownItemControl);
        }
Ejemplo n.º 2
0
        private void CreateMarkdownControl(NameAttribute displayNameAttribute, RequiredAttribute requiredAttribute, Binding b)
        {
            var markdownItemControl = new ConfigMarkdownControl(_localController.GetLocalStrings<SDGuiStrings>());
            markdownItemControl.ConfigItemDisplayName = _localController.GetLocalString(displayNameAttribute.LocalType, displayNameAttribute.DisplayName);
            markdownItemControl.SetBinding(ConfigMarkdownControl.ConfigItemValueProperty, b);
            markdownItemControl.WaterMarkText = requiredAttribute != null ? _localController.GetLocalStrings<SDGuiStrings>().Mandatory : _localController.GetLocalStrings<SDGuiStrings>().Optional;
            markdownItemControl.WaterMarkColor = requiredAttribute != null ? (SolidColorBrush)TryFindResource("Color_FadedRed") : (SolidColorBrush)TryFindResource("Color_FadedGray");

            configItemPanel.Children.Add(markdownItemControl);
        }