I want to grab the default Style for a TextBlock in code behind without ever having adding a custom default textblock style to resources in xaml
I've got a method like this:
public TextBlock DrawTextBlockAtPoint(string text, Style textblockStyle)
{
//...
}
that I want to provide an override that just uses the regular TextBlock style
public TextBlock DrawTextBlockAtPoint(string text)
{
Style textblockdefaultstyle = *GetDefaultStyleForProperty(TextBlock.StyleProperty);
DrawTextBlockAtPoint(text, textblockdefaultstyle)
}
Is there anyway to do this?