source/uwp/Renderer/lib/XamlHelpers.cpp
void FormatErrorMessageWithHostConfig(winrt::AdaptiveRenderContext const& renderContext, winrt::TextBlock const& errorMessage)
    {
        auto hostConfig = renderContext.HostConfig();
        auto inputsConfig = hostConfig.Inputs();
        auto errorMessageConfig = inputsConfig.ErrorMessage();

        // Set size defined in host config
        winrt::TextSize textSize = errorMessageConfig.Size();
        uint32_t resultSize = GetFontSizeFromFontType(hostConfig, winrt::FontType::Default, textSize);
        errorMessage.FontSize(resultSize);

        // Set weight defined in host config
        winrt::TextWeight textWeight = errorMessageConfig.Weight();
        auto resultWeight = GetFontWeightFromStyle(hostConfig, winrt::FontType::Default, textWeight);
        errorMessage.FontWeight(resultWeight);
    }
// Error messages are formatted for text size and weight
Error messages are formatted for text size and weight
Error messages are formatted for text size and weight
void FormatErrorMessageWithHostConfig(winrt::AdaptiveRenderContext const& renderContext, winrt::TextBlock const& errorMessage)
    {
        auto hostConfig = renderContext.HostConfig();
        auto inputsConfig = hostConfig.Inputs();
        auto errorMessageConfig = inputsConfig.ErrorMessage();
        winrt::TextSize textSize = errorMessageConfig.Size();
        uint32_t resultSize = GetFontSizeFromFontType(hostConfig, winrt::FontType::Default, textSize);
        errorMessage.FontSize(resultSize);
        winrt::TextWeight textWeight = errorMessageConfig.Weight();
        auto resultWeight = GetFontWeightFromStyle(hostConfig, winrt::FontType::Default, textWeight);
        errorMessage.FontWeight(resultWeight);
    }
void FormatErrorMessageWithHostConfig ( winrt :: AdaptiveRenderContext const & renderContext , winrt :: TextBlock const & errorMessage ) { auto hostConfig = renderContext . HostConfig ( ) ; auto inputsConfig = hostConfig . Inputs ( ) ; auto errorMessageConfig = inputsConfig . ErrorMessage ( ) ; winrt :: TextSize textSize = errorMessageConfig . Size ( ) ; uint32_t resultSize = GetFontSizeFromFontType ( hostConfig , winrt :: FontType :: Default , textSize ) ; errorMessage . FontSize ( resultSize ) ; winrt :: TextWeight textWeight = errorMessageConfig . Weight ( ) ; auto resultWeight = GetFontWeightFromStyle ( hostConfig , winrt :: FontType :: Default , textWeight ) ; errorMessage . FontWeight ( resultWeight ) ; }
Error messages are formatted for text size and weight
Error messages are formatted for text size and weight
// Set size defined in host config // Set weight defined in host config