myTextBlock.SetValue(TextBlock.FontSizeProperty, 14); myTextBlock.ClearValue(TextBlock.FontSizeProperty);
SolidColorBrush myBrush = new SolidColorBrush(Colors.Red); myTextBlock.SetValue(TextBlock.ForegroundProperty, myBrush); myTextBlock.ClearValue(TextBlock.ForegroundProperty);The TextBlock.ClearValue method is part of the System.Windows.Controls namespace, which is included in the presentationframework.dll package.