private static void Update(UIElement element) { foreach (DependencyObject Child in element.GetVisualDescendantsDepthFirst <DependencyObject>()) { if (Child is TextBlock) { foreach (Inline Inline in ((TextBlock)Child).Inlines) { if (Inline is InlineUIContainer) { ProgressControl.Update(((InlineUIContainer)Inline).Child); } Inline.InvalidateProperty(UIElement.IsEnabledProperty); } } Child.InvalidateProperty(UIElement.IsEnabledProperty); } }