private void AdaptTextToCategory() { if (this.sp_Symbols == null) { return; } string category_current = ComponentUtils.CategoryToString(this.CategoryToShow); foreach (var child in this.sp_Symbols.Children) { TextBlockDoubleText tbDT = child as TextBlockDoubleText; if (tbDT == null) { continue; } if (tbDT.Tag == null) { continue; } if (!(tbDT.Tag is int)) { continue; } tbDT.TextCopy = category_current[(int)tbDT.Tag].ToString(); } }