private void shumashoubao_Selected(object sender, RoutedEventArgs e) { root.Children.Clear(); if (shoubao == null) { shoubao = new Morse(); } root.Children.Add(shoubao); }
/// <summary> /// 绘制tabitem,一次性渲染所有模块,会有性能损失,后期如有需要,将进行使用时渲染 /// </summary> /// <param name="drawingContext"></param> protected override void OnRender(DrawingContext drawingContext) { if (isFirstRender) { Dengguang dg = new Dengguang(); Shouqi sq = new Shouqi(); Qihao qh = new Qihao(); Lilun ll = new Lilun(); Morse morse = new Morse(); tabItem_kaohe.Content = morse; isFirstRender = false; } base.OnRender(drawingContext); }