Reducing this question to the bare minimum, consider this MarkupExtension class...
public class ProblemStatement : MarkupExtension
{
private readonly string
Try this out:
public string Optional{ get; set; } = "DefaultValue";
private readonly string _mandatory;
public ProblemStatement(string mandatory)
{
_mandatory = mandatory;
}
Usage:
<TextBlock Name="TextBlock1" Tag="{local:ProblemStatement 'hello', Optional=NotDefault}"/>
Alternative:
<TextBlock Name="TextBlock1" Tag="{local:ProblemStatement 'hello'}"/>
Result: