/
SplashScreen.xml
308 lines (286 loc) · 20.2 KB
/
SplashScreen.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
<Type Name="SplashScreen" FullName="System.Windows.SplashScreen">
<TypeSignature Language="C#" Value="public class SplashScreen" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit SplashScreen extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Windows.SplashScreen" />
<TypeSignature Language="VB.NET" Value="Public Class SplashScreen" />
<TypeSignature Language="F#" Value="type SplashScreen = class" />
<TypeSignature Language="C++ CLI" Value="public ref class SplashScreen" />
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Provides a startup screen for a Windows Presentation Foundation (WPF) application.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Windows.SplashScreen> class to show an image in a startup window, or *splash screen*, when a WPF application starts. Call the <xref:System.Windows.SplashScreen.Show%2A> method to display the splash screen. Call the <xref:System.Windows.SplashScreen.Close%2A> method to close the splash screen. Specify the image to use in the <xref:System.Windows.SplashScreen> constructor.
The <xref:System.Windows.SplashScreen> class can display any image format that is supported by the Windows Imaging Component (WIC). For example, you can use the BMP, GIF, JPEG, PNG, or TIFF format. If the image is a PNG file and it includes an alpha channel, the image is rendered using the transparency defined in the alpha channel.
You cannot include placeholder text in the splash screen that is later added by your code. If you want to include text in the splash screen, you must add it to the image file.
> [!NOTE]
> It is not necessary to write any code to display a splash screen. Starting in Visual Studio 2008 SP1, you can quickly configure a splash screen with default settings. For more information, see [How to: Add a Splash Screen to a WPF Application](/dotnet/framework/wpf/app-development/how-to-add-a-splash-screen-to-a-wpf-application).
The <xref:System.Windows.SplashScreen> class displays the splash screen as soon as possible after the application is started. The splash screen is displayed by using native code, before the WPF application instance is created. The splash screen is displayed in the center of the screen. When the application is loaded, the splash screen fades.
When your application is compiled, the image is embedded as a managed resource in the assembly. If the application is localized, the image is embedded in the localized satellite DLL.
> [!NOTE]
> The <xref:System.Windows.SplashScreen> class is not available in partial trust.
> [!NOTE]
> The <xref:System.Windows.SplashScreen> class cannot be used in XAML Browser Applications (XBAPs), because they use a different startup architecture.
## Examples
The following code example shows how to create and display a startup window by using the <xref:System.Windows.SplashScreen> class.
:::code language="csharp" source="~/snippets/csharp/System.Windows/SplashScreen/Overview/App.xaml.cs" id="Snippet2":::
]]></format>
</remarks>
<altmember cref="M:System.Windows.SplashScreen.Show(System.Boolean)" />
<altmember cref="M:System.Windows.SplashScreen.Close(System.TimeSpan)" />
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.SplashScreen" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public SplashScreen (string resourceName);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string resourceName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.SplashScreen.#ctor(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (resourceName As String)" />
<MemberSignature Language="F#" Value="new System.Windows.SplashScreen : string -> System.Windows.SplashScreen" Usage="new System.Windows.SplashScreen resourceName" />
<MemberSignature Language="C++ CLI" Value="public:
 SplashScreen(System::String ^ resourceName);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Security.SecurityCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="resourceName" Type="System.String" />
</Parameters>
<Docs>
<param name="resourceName">The name of the embedded resource.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.SplashScreen" /> class with the specified resource.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `resourceName` parameter follows the usual rules for embedded resources. For more information, see the <xref:System.Resources.ResourceManager> class. The `resourceName` parameter specifies the name of the resource file, and not a URI.
]]></format>
</remarks>
<altmember cref="M:System.Windows.SplashScreen.#ctor(System.Reflection.Assembly,System.String)" />
<altmember cref="T:System.Resources.ResourceManager" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public SplashScreen (System.Reflection.Assembly resourceAssembly, string resourceName);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Reflection.Assembly resourceAssembly, string resourceName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.SplashScreen.#ctor(System.Reflection.Assembly,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (resourceAssembly As Assembly, resourceName As String)" />
<MemberSignature Language="F#" Value="new System.Windows.SplashScreen : System.Reflection.Assembly * string -> System.Windows.SplashScreen" Usage="new System.Windows.SplashScreen (resourceAssembly, resourceName)" />
<MemberSignature Language="C++ CLI" Value="public:
 SplashScreen(System::Reflection::Assembly ^ resourceAssembly, System::String ^ resourceName);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Security.SecurityCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="resourceAssembly" Type="System.Reflection.Assembly" />
<Parameter Name="resourceName" Type="System.String" />
</Parameters>
<Docs>
<param name="resourceAssembly">The assembly that contains the embedded resource.</param>
<param name="resourceName">The name of the embedded resource.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.SplashScreen" /> class with the specified resource assembly.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `resourceAssembly` and `resourceName` parameters follow the usual rules for embedded resources. For more information, see the <xref:System.Resources.ResourceManager> class. The `resourceName` parameter specifies the name of the resource file, and not a URI.
]]></format>
</remarks>
<altmember cref="M:System.Windows.SplashScreen.#ctor(System.String)" />
<altmember cref="T:System.Resources.ResourceManager" />
</Docs>
</Member>
<Member MemberName="Close">
<MemberSignature Language="C#" Value="public void Close (TimeSpan fadeoutDuration);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Close(valuetype System.TimeSpan fadeoutDuration) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.SplashScreen.Close(System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Sub Close (fadeoutDuration As TimeSpan)" />
<MemberSignature Language="F#" Value="member this.Close : TimeSpan -> unit" Usage="splashScreen.Close fadeoutDuration" />
<MemberSignature Language="C++ CLI" Value="public:
 void Close(TimeSpan fadeoutDuration);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Security.SecurityCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="fadeoutDuration" Type="System.TimeSpan" />
</Parameters>
<Docs>
<param name="fadeoutDuration">A <see cref="T:System.TimeSpan" /> that specifies how long it will take for the splash screen to fade after the close operation has been initiated.</param>
<summary>Closes the splash screen.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If you called the <xref:System.Windows.SplashScreen.Show%2A> method with the `autoClose` parameter set to `true`, you do not have to call the <xref:System.Windows.SplashScreen.Close%2A> method. The splash screen will close automatically after the application is loaded. When the splash screen closes, the length of time it will take for it to fade is determined by the default value for the `fadeoutDuration` parameter, which is 300 milliseconds.
]]></format>
</remarks>
<altmember cref="M:System.Windows.SplashScreen.Show(System.Boolean)" />
<altmember cref="T:System.TimeSpan" />
</Docs>
</Member>
<MemberGroup MemberName="Show">
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Displays the splash screen.</summary>
</Docs>
</MemberGroup>
<Member MemberName="Show">
<MemberSignature Language="C#" Value="public void Show (bool autoClose);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Show(bool autoClose) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.SplashScreen.Show(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub Show (autoClose As Boolean)" />
<MemberSignature Language="F#" Value="member this.Show : bool -> unit" Usage="splashScreen.Show autoClose" />
<MemberSignature Language="C++ CLI" Value="public:
 void Show(bool autoClose);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Security.SecurityCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="autoClose" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="autoClose">
<see langword="true" /> to automatically close the splash screen; <see langword="false" /> to close the splash screen manually.</param>
<summary>Displays the splash screen.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If you call the <xref:System.Windows.SplashScreen.Show%2A> method with `autoClose` set to `true`, you do not have to call the <xref:System.Windows.SplashScreen.Close%2A> method. The splash screen will close automatically after the application is loaded. When the splash screen closes, the length of time it will take for it to fade is determined by the default value for the `fadeoutDuration` parameter, which is 300 milliseconds.
Call the <xref:System.Windows.SplashScreen.Show%2A> method with `autoClose` set to `false` when you want to provide a non-default value for the fade duration. You will have to call the <xref:System.Windows.SplashScreen.Close%2A> method to close the splash screen.
]]></format>
</remarks>
<exception cref="T:System.IO.IOException">The resource specified in the constructor could not be found.</exception>
<altmember cref="M:System.Windows.SplashScreen.Close(System.TimeSpan)" />
</Docs>
</Member>
<Member MemberName="Show">
<MemberSignature Language="C#" Value="public void Show (bool autoClose, bool topMost);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Show(bool autoClose, bool topMost) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.SplashScreen.Show(System.Boolean,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub Show (autoClose As Boolean, topMost As Boolean)" />
<MemberSignature Language="F#" Value="member this.Show : bool * bool -> unit" Usage="splashScreen.Show (autoClose, topMost)" />
<MemberSignature Language="C++ CLI" Value="public:
 void Show(bool autoClose, bool topMost);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Security.SecurityCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="autoClose" Type="System.Boolean" Index="0" FrameworkAlternate="net-5.0;net-6.0;netcore-3.0;netcore-3.1;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;netframework-4.8.1;windowsdesktop-8.0;windowsdesktop-9.0" />
<Parameter Name="topMost" Type="System.Boolean" Index="1" FrameworkAlternate="net-5.0;net-6.0;netcore-3.0;netcore-3.1;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;netframework-4.8.1;windowsdesktop-8.0;windowsdesktop-9.0" />
</Parameters>
<Docs>
<param name="autoClose">
<see langword="true" /> to automatically close the splash screen; <see langword="false" /> to close the splash screen manually.</param>
<param name="topMost">
<see langword="true" /> if the splash screen window should use the WS_EX_TOPMOST style; otherwise <see langword="false" />.</param>
<summary>Displays the splash screen.</summary>
<remarks>To be added.</remarks>
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkID=145016">CreateWindowEx</related>
</Docs>
</Member>
</Members>
</Type>