alle warnungen (2) beseitigt
This commit is contained in:
parent
fa43a710ab
commit
18099cd77c
@ -58,9 +58,14 @@ namespace Project_Periodensystem.View
|
||||
// Update text colors for all direct TextBlocks
|
||||
foreach (var textBlock in control.GetVisualDescendants().OfType<TextBlock>())
|
||||
{
|
||||
if (textBlock.Parent is Button || textBlock.Parent.ToString().Contains("ElementTile"))
|
||||
var parent = textBlock.Parent;
|
||||
if (parent == null ||
|
||||
parent is Button ||
|
||||
parent?.GetType().ToString().Contains("ElementTile") == true)
|
||||
{
|
||||
continue;
|
||||
|
||||
}
|
||||
|
||||
textBlock.Foreground = new SolidColorBrush(Color.Parse(foreground));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user