I have a simple IMarkupExtension as follows:
public class HelloWorldMarkup : IMarkupExtension<string>
{
public string ProvideValue(IServiceProvider serviceProvider)
{
return "Hello World";
}
public override string ToString()
{
return "DesignTime Hello World";
}
}
and my Xaml that uses it like this..
<StackPanel>
<TextBlock Text="{my:HelloWorldMarkup}" />
<HyperlinkButton Content="{my:HelloWorldMarkup}" />
</StackPanel>
At runtime, it all works as expected.
At design time however, the Content of the hyperlink shows the design time values (from ToString), but the TextBlock’s Text does not show.
If I leave it like this, my designer will whinge to me for days.. Does anyone have any suggestions on how I can have my Markups display design time data in TextBlock Text?
Many thanks,
try..