Esempio n. 1
0
 /// <summary>
 /// 传过来的对象为控件
 /// </summary>
 /// <param name="content"></param>
 /// <param name="title"></param>
 private static void ShowContext(object content, string title)
 {
     // 正常提示框窗口
     PopupTaskBar objNotifier = new PopupTaskBar();
     objNotifier.Content = content;
     objNotifier.Title = title;
     objNotifier.Show();
 }
Esempio n. 2
0
 /// <summary>
 /// 正常情况下显示提示框窗口
 /// </summary>
 /// <param name="content"></param>
 /// <param name="title"></param>
 private static void ShowObject(string content, string title)
 {
     // 正常提示框窗口
     PopupTaskBar objNotifier = new PopupTaskBar();
     ScrollViewer scroll = new ScrollViewer();
     scroll.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
     scroll.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
     TextBlock txt = new TextBlock();
     //txt.Background = Brushes.Red;
     txt.Width = objNotifier.Width;
     txt.Text = content;
     txt.TextWrapping = TextWrapping.WrapWithOverflow;
     scroll.Content = txt;
     objNotifier.Content = scroll;
     objNotifier.Title = title;
     objNotifier.Show();
 }