It is a way to insert any static value into XAML. For example, if I have a class:
namespace A
{
public class MyConstants
{
public static readonly string SomeConstantString = "BAM!";
}
}
I can place it into a WPF UI using XAML like this:
<TextBlock Text="{x:Static A:MyConstants.SomeConstantString}" />
Notice, you will have to import the namespace in which MyConstants is defined into your XAML. So in the or element do something like:
xmlns:A="clr-namespace:A"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…