我正在尝试在WPF中的图像控件上有一个背景图像,例如,如果我加载一个透明的PNG,我仍然可以看到背景.是否可能,或者微软完全放弃了WPF的这个功能,我必须依靠StackPanels/Grids /无论如何实现这一目标?
我正在我的计算机上注册一个自定义协议处理程序,它调用此应用程序:
string prefix = "runapp://";
// The name of this app for user messages
string title = "RunApp URL Protocol Handler";
// Verify the command line arguments
if (args.Length == 0 || !args[0].StartsWith(prefix))
{
MessageBox.Show("Syntax:\nrunapp://<key>", title); return;
}
string key = args[0].Remove(0, "runapp://".Length);
key.TrimEnd('/');
string application = "";
string parameters = "";
string applicationDirectory = "";
if (key.Contains("~"))
{
application = key.Split('~')[0];
parameters = key.Split('~')[1];
}
else
{
application = key;
}
applicationDirectory = Directory.GetParent(application).FullName;
ProcessStartInfo psInfo = new ProcessStartInfo(); …Run Code Online (Sandbox Code Playgroud)