Example #1
0
 public static void ShowTips(this FrameworkElement _Owner, string _ShowText = null, int _ShowSize = 18, int _ShowTime = 3, Color _ShowColor = new Color())
 {
     if (_ShowColor.Equals(new Color {
     }))
     {
         _ShowColor.A = 0xFF;
     }
     XTipsMessage.Show(_Owner, _ShowColor, _ShowText, _ShowSize, _ShowTime);
 }
Example #2
0
        public static void Show(FrameworkElement _Owner, Color _ShowColor, string _ShowText = null, int _ShowSize = 18, int _ShowTime = 3)
        {
            XTipsMessage win  = new XTipsMessage(_ShowTime);
            Window       pwin = Window.GetWindow(_Owner);

            win.Owner = pwin;
            pwin.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            win.showTB.Foreground      = new SolidColorBrush(_ShowColor);
            win.showTB.FontSize        = (double)_ShowSize;
            win.showTB.Text            = _ShowText;
            var loc = _Owner.PointToScreen(new Point());

            win.Left = loc.X + (_Owner.ActualWidth - win.Width) / 2;
            win.Top  = loc.Y + (_Owner.ActualHeight - win.Height) / 2;
            win.Show();
        }