alle warnungen (2) beseitigt
This commit is contained in:
parent
fa43a710ab
commit
18099cd77c
@ -58,8 +58,13 @@ namespace Project_Periodensystem.View
|
|||||||
// Update text colors for all direct TextBlocks
|
// Update text colors for all direct TextBlocks
|
||||||
foreach (var textBlock in control.GetVisualDescendants().OfType<TextBlock>())
|
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;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
textBlock.Foreground = new SolidColorBrush(Color.Parse(foreground));
|
textBlock.Foreground = new SolidColorBrush(Color.Parse(foreground));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user