private void AllTools_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (AllTools.SelectedItem == null) { return; } Tool t = HWC.GetTool(AllTools.SelectedItem.ToString()); if (t != null) { Current = t; Data.ControlIdent = t.ControlIdent; Data.CName = t.Name; Data.Focus = Axis.SConvertIntToStr(t.Fokus); Data.ToolTypeIndex = (int)t.MyToolType; Data.CO_X = Axis.SConvertIntToStr(t.CameraOffset[0]); Data.CO_Y = Axis.SConvertIntToStr(t.CameraOffset[1]); Data.RightVisibility = System.Windows.Visibility.Visible; } }