Loading...
Loading...
Compare original and translation side by side
using Syncfusion.Windows.Forms.Tools;
// Create splash panel
SplashPanel splashPanel = new SplashPanel();
splashPanel.Size = new Size(400, 300);
splashPanel.DesktopAlignment = SplashAlignment.Center;
splashPanel.TimerInterval = 3000; // Show for 3 seconds
splashPanel.ShowAnimation = true;
splashPanel.SlideStyle = SlideStyle.FadeIn;
// Add to form
this.Controls.Add(splashPanel);
// Show splash
splashPanel.ShowSplash();Imports Syncfusion.Windows.Forms.Tools
' Create splash panel
Dim splashPanel As New SplashPanel()
splashPanel.Size = New Size(400, 300)
splashPanel.DesktopAlignment = SplashAlignment.Center
splashPanel.TimerInterval = 3000 ' Show for 3 seconds
splashPanel.ShowAnimation = True
splashPanel.SlideStyle = SlideStyle.FadeIn
' Add to form
Me.Controls.Add(splashPanel)
' Show splash
splashPanel.ShowSplash()using Syncfusion.Windows.Forms.Tools;
// Create splash panel
SplashPanel splashPanel = new SplashPanel();
splashPanel.Size = new Size(400, 300);
splashPanel.DesktopAlignment = SplashAlignment.Center;
splashPanel.TimerInterval = 3000; // Show for 3 seconds
splashPanel.ShowAnimation = true;
splashPanel.SlideStyle = SlideStyle.FadeIn;
// Add to form
this.Controls.Add(splashPanel);
// Show splash
splashPanel.ShowSplash();Imports Syncfusion.Windows.Forms.Tools
' Create splash panel
Dim splashPanel As New SplashPanel()
splashPanel.Size = New Size(400, 300)
splashPanel.DesktopAlignment = SplashAlignment.Center
splashPanel.TimerInterval = 3000 ' Show for 3 seconds
splashPanel.ShowAnimation = True
splashPanel.SlideStyle = SlideStyle.FadeIn
' Add to form
Me.Controls.Add(splashPanel)
' Show splash
splashPanel.ShowSplash()// Application startup splash
SplashPanel startupSplash = new SplashPanel();
startupSplash.Size = new Size(500, 350);
startupSplash.BackgroundImage = Image.FromFile("splash_image.png");
startupSplash.DesktopAlignment = SplashAlignment.Center;
startupSplash.TimerInterval = 5000;
startupSplash.ShowAnimation = true;
startupSplash.AnimationSpeed = 20;
// Add label with version info
Label versionLabel = new Label();
versionLabel.Text = "Version 2.0";
versionLabel.Location = new Point(20, 300);
versionLabel.AutoSize = true;
startupSplash.Controls.Add(versionLabel);
this.Controls.Add(startupSplash);
startupSplash.ShowSplash();// Application startup splash
SplashPanel startupSplash = new SplashPanel();
startupSplash.Size = new Size(500, 350);
startupSplash.BackgroundImage = Image.FromFile("splash_image.png");
startupSplash.DesktopAlignment = SplashAlignment.Center;
startupSplash.TimerInterval = 5000;
startupSplash.ShowAnimation = true;
startupSplash.AnimationSpeed = 20;
// Add label with version info
Label versionLabel = new Label();
versionLabel.Text = "Version 2.0";
versionLabel.Location = new Point(20, 300);
versionLabel.AutoSize = true;
startupSplash.Controls.Add(versionLabel);
this.Controls.Add(startupSplash);
startupSplash.ShowSplash();// Non-obtrusive notification (like MSN Messenger)
SplashPanel notificationPanel = new SplashPanel();
notificationPanel.Size = new Size(300, 100);
notificationPanel.DesktopAlignment = SplashAlignment.RightBottom;
notificationPanel.SlideStyle = SlideStyle.BottomToTop;
notificationPanel.AnimationDirection = AnimationDirection.Default;
notificationPanel.TimerInterval = 5000;
notificationPanel.ShowAnimation = true;
notificationPanel.CloseOnClick = true;
notificationPanel.SuspendAutoCloseWhenMouseOver = true;
// Add notification content
Label messageLabel = new Label();
messageLabel.Text = "New message received!";
messageLabel.Location = new Point(10, 40);
notificationPanel.Controls.Add(messageLabel);
this.Controls.Add(notificationPanel);
notificationPanel.ShowSplash();// Non-obtrusive notification (like MSN Messenger)
SplashPanel notificationPanel = new SplashPanel();
notificationPanel.Size = new Size(300, 100);
notificationPanel.DesktopAlignment = SplashAlignment.RightBottom;
notificationPanel.SlideStyle = SlideStyle.BottomToTop;
notificationPanel.AnimationDirection = AnimationDirection.Default;
notificationPanel.TimerInterval = 5000;
notificationPanel.ShowAnimation = true;
notificationPanel.CloseOnClick = true;
notificationPanel.SuspendAutoCloseWhenMouseOver = true;
// Add notification content
Label messageLabel = new Label();
messageLabel.Text = "New message received!";
messageLabel.Location = new Point(10, 40);
notificationPanel.Controls.Add(messageLabel);
this.Controls.Add(notificationPanel);
notificationPanel.ShowSplash();// Modal splash dialog that blocks interaction
SplashPanel modalSplash = new SplashPanel();
modalSplash.Size = new Size(400, 200);
modalSplash.TimerInterval = -1; // No auto-close
modalSplash.DesktopAlignment = SplashAlignment.Center;
// Add progress indicator
Label loadingLabel = new Label();
loadingLabel.Text = "Loading, please wait...";
loadingLabel.Location = new Point(120, 90);
loadingLabel.AutoSize = true;
modalSplash.Controls.Add(loadingLabel);
this.Controls.Add(modalSplash);
// Show as modal dialog (blocks until closed)
modalSplash.ShowDialogSplash(this);// Modal splash dialog that blocks interaction
SplashPanel modalSplash = new SplashPanel();
modalSplash.Size = new Size(400, 200);
modalSplash.TimerInterval = -1; // No auto-close
modalSplash.DesktopAlignment = SplashAlignment.Center;
// Add progress indicator
Label loadingLabel = new Label();
loadingLabel.Text = "Loading, please wait...";
loadingLabel.Location = new Point(120, 90);
loadingLabel.AutoSize = true;
modalSplash.Controls.Add(loadingLabel);
this.Controls.Add(modalSplash);
// Show as modal dialog (blocks until closed)
modalSplash.ShowDialogSplash(this);// Splash with gradient background and animation
SplashPanel animatedSplash = new SplashPanel();
animatedSplash.Size = new Size(450, 300);
animatedSplash.BackgroundColor = new BrushInfo(
GradientStyle.Vertical,
Color.DarkBlue,
Color.LightBlue);
animatedSplash.DesktopAlignment = SplashAlignment.Center;
animatedSplash.SlideStyle = SlideStyle.Horizontal;
animatedSplash.ShowAnimation = true;
animatedSplash.AnimationSpeed = 30;
animatedSplash.TimerInterval = 4000;
animatedSplash.ShowAsTopMost = true;
this.Controls.Add(animatedSplash);
animatedSplash.ShowSplash();// Splash with gradient background and animation
SplashPanel animatedSplash = new SplashPanel();
animatedSplash.Size = new Size(450, 300);
animatedSplash.BackgroundColor = new BrushInfo(
GradientStyle.Vertical,
Color.DarkBlue,
Color.LightBlue);
animatedSplash.DesktopAlignment = SplashAlignment.Center;
animatedSplash.SlideStyle = SlideStyle.Horizontal;
animatedSplash.ShowAnimation = true;
animatedSplash.AnimationSpeed = 30;
animatedSplash.TimerInterval = 4000;
animatedSplash.ShowAsTopMost = true;
this.Controls.Add(animatedSplash);
animatedSplash.ShowSplash();// Splash at custom screen location
SplashPanel customSplash = new SplashPanel();
customSplash.Size = new Size(350, 250);
customSplash.DesktopAlignment = SplashAlignment.Custom;
customSplash.TimerInterval = 3000;
// Show at mouse position
Point mousePos = Control.MousePosition;
customSplash.ShowSplash(mousePos, this, false);// Splash at custom screen location
SplashPanel customSplash = new SplashPanel();
customSplash.Size = new Size(350, 250);
customSplash.DesktopAlignment = SplashAlignment.Custom;
customSplash.TimerInterval = 3000;
// Show at mouse position
Point mousePos = Control.MousePosition;
customSplash.ShowSplash(mousePos, this, false);// Splash with event handlers
SplashPanel eventSplash = new SplashPanel();
eventSplash.Size = new Size(400, 250);
eventSplash.DesktopAlignment = SplashAlignment.Center;
eventSplash.TimerInterval = 5000;
// Subscribe to events
eventSplash.BeforeSplash += (s, e) => {
Console.WriteLine("About to show splash");
};
eventSplash.SplashDisplayed += (s, e) => {
Console.WriteLine("Splash is now visible");
};
eventSplash.SplashClosing += (s, e) => {
Console.WriteLine("Splash is closing");
// e.Cancel = true; // Uncomment to prevent closing
};
eventSplash.SplashClosed += (s, e) => {
Console.WriteLine($"Splash closed: {e.SplashCloseType}");
};
this.Controls.Add(eventSplash);
eventSplash.ShowSplash();// Splash with event handlers
SplashPanel eventSplash = new SplashPanel();
eventSplash.Size = new Size(400, 250);
eventSplash.DesktopAlignment = SplashAlignment.Center;
eventSplash.TimerInterval = 5000;
// Subscribe to events
eventSplash.BeforeSplash += (s, e) => {
Console.WriteLine("About to show splash");
};
eventSplash.SplashDisplayed += (s, e) => {
Console.WriteLine("Splash is now visible");
};
eventSplash.SplashClosing += (s, e) => {
Console.WriteLine("Splash is closing");
// e.Cancel = true; // Uncomment to prevent closing
};
eventSplash.SplashClosed += (s, e) => {
Console.WriteLine($"Splash closed: {e.SplashCloseType}");
};
this.Controls.Add(eventSplash);
eventSplash.ShowSplash();| Property | Type | Description |
|---|---|---|
| int | Duration in milliseconds to display splash (-1 for no auto-close) |
| SplashAlignment | Position on desktop (Center, SystemTray, corners, Custom) |
| SlideStyle | Animation style (Horizontal, Vertical, FadeIn, etc.) |
| int | Speed of animation transition (higher = faster) |
| bool | Enable/disable animation on display |
| bool | Display splash as topmost window |
| BrushInfo | Gradient or solid background color |
| Image | Background image for splash |
| bool | Allow user to move splash at runtime |
| bool | Allow user to resize splash at runtime |
| bool | Close splash when user clicks on it |
| bool | Suspend auto-close timer when mouse is over splash |
| AnimationDirection | Direction of slide animation |
| MarqueeDirection | Direction of marquee transition |
| Border3DStyle | 3D border style for splash |
| Color | Transparent color for background |
| bool | Display splash in Windows taskbar |
| 属性 | 类型 | 描述 |
|---|---|---|
| int | 闪屏展示时长,单位为毫秒(-1表示不自动关闭) |
| SplashAlignment | 桌面展示位置(居中、系统托盘、角落、自定义) |
| SlideStyle | 动画样式(水平、垂直、淡入等) |
| int | 动画过渡速度(数值越高速度越快) |
| bool | 启用/禁用展示动画 |
| bool | 将闪屏展示为置顶窗口 |
| BrushInfo | 渐变或纯色背景 |
| Image | 闪屏背景图片 |
| bool | 允许用户运行时拖动闪屏 |
| bool | 允许用户运行时调整闪屏大小 |
| bool | 用户点击闪屏时关闭 |
| bool | 鼠标悬停在闪屏上时暂停自动关闭计时器 |
| AnimationDirection | 滑动动画方向 |
| MarqueeDirection | 跑马灯过渡方向 |
| Border3DStyle | 闪屏3D边框样式 |
| Color | 背景透明色 |
| bool | 在Windows任务栏展示闪屏 |
| Method | Description |
|---|---|
| Display the splash panel |
| Display at specific location with owner form |
| Display as modal dialog |
| Display as modal dialog at specific location |
| Hide the splash panel |
| Check if splash is currently displayed |
| Suspend auto-close timer |
| Restore auto-close timer |
| 方法 | 描述 |
|---|---|
| 展示闪屏面板 |
| 在指定位置展示,绑定所有者窗体 |
| 展示为模态对话框 |
| 在指定位置展示为模态对话框 |
| 隐藏闪屏面板 |
| 检查闪屏当前是否处于展示状态 |
| 暂停自动关闭计时器 |
| 恢复自动关闭计时器 |