@ 在 WP7 磁贴标题开头替换为路径:已知问题?

发布于 2025-01-05 03:56:36 字数 1010 浏览 1 评论 0原文

我正在使用 ShellTile.Create 方法创建辅助图块。我开发的应用程序的用户注意到,如果他们固定的实体的名称以“@”开头(然后用于磁贴的标题),则手机显示的标题为“ @\Applications\" ....

在我看来,手机似乎以某种方式将名称开头的“@”视为特殊的,并将其替换为路径...

这里我设置 ShellTileData。标题为“@Test”。这就是被固定的内容:

Screenshot Showing pinnedtile with odd name

我已经尝试过对标题进行 UrlEncoding - 没有运气。

以前有人遇到过这个吗?这是一个已知问题吗?

达米安

我已经接受了下面科林的回答。这是我现在根据他的建议使用的代码:

...
if(initialData.Title.StartsWith("@")) {
    initialData.Title = '\uff20' + initialData.Title.Substring(1);
}
ShellTile.Create(uri, initialData);

I'm using the ShellTile.Create method to create a secondary tile. Users of the app I've developed have noticed that if the entity they are pinning has a name that starts with "@" (which is then used for the title of the tile), then the title that is displayed by the phone is "@\Applications\" ....

It looks to me as though the phone treats an "@" at the start of the name as special somehow, and replaces it with a path ...

Here I'm setting the ShellTileData.Title to "@Test". This is what gets pinned:

Screenshot showing pinned tile with weird name

I've tried UrlEncoding the title - no luck.

Has anyone come across this before? Is it a known issue?

Damian

I've accepted Colin's answer below. This is the code I'm now using based on his suggestion:

...
if(initialData.Title.StartsWith("@")) {
    initialData.Title = '\uff20' + initialData.Title.Substring(1);
}
ShellTile.Create(uri, initialData);

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

乞讨 2025-01-12 03:56:36

根据我的评论...尝试一下\uFF20,我怀疑有人会注意到@和@之间的区别。

As per my comment ... give \uFF20 a go, I doubt anyone will notice the difference between @ and @.

香橙ぽ 2025-01-12 03:56:36

Microsoft 的 Eric Fleck 在这里回复:http://forums.create。 msdn.com/forums/p/100059/598687.aspx#598687

下面提到了该问题Peter Torr 博客上的“谨防‘@’符号”:http://blogs.msdn.com/b/ptorr/archive/2011/07/12/background-agents-part-3-of-3.aspx

Peter 建议添加零-Width-Space unicode char (8203) 到以 @ 开头的图块名称的开头。

Eric Fleck from Microsoft responded here: http://forums.create.msdn.com/forums/p/100059/598687.aspx#598687

There is a mention of the issue under "Beware of the '@' Sign" on Peter Torr's blog here: http://blogs.msdn.com/b/ptorr/archive/2011/07/12/background-agents-part-3-of-3.aspx

Peter recommends adding a Zero-Width-Space unicode char (8203) to the start of tile names that begin with an @.

Bonjour°[大白 2025-01-12 03:56:36

好吧,当你们谈论“代码”时,我只知道“@”符号是由普通欧盟输入“shift+2”提供的,这是非常常见的。这是 GTD 的“把事情做好”实践,已经存在多年了。因此,它可能比一般开发人员/编码人员想象的更常见。

同时,感谢您对达米安的调查。

Well while you guys talk "code," all I know is the "@" symbol as supplied by typing "shift+2" by your average EU, is extremely common. This is a GTD "Getting Things Done" practice that has been around for a number of years. So it may be more common than the average dev/coder may think.

In the meantime, thanks for looking into this Damian.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文