private void TextBlock_info_flow_MouseUp(object sender, MouseButtonEventArgs e) { TextBlock tb = sender as TextBlock; if (tb == null) { return; } if (string.IsNullOrEmpty(tb.Text)) { return; } InfoFlow infoF = ComponentUtils.StringToInfoFlow(tb.Text); int nrTypes = Enum.GetNames(typeof(InfoFlow)).Length; int tmp = (int)(infoF + 1) % nrTypes; infoF = (InfoFlow)((int)(infoF + 1) % nrTypes); tb.Text = ComponentUtils.InfoFlowToString(infoF); tb.ToolTip = ComponentUtils.InfoFlowStringToDescription(tb.Text); }