【问题标题】:Change a Windows Store App's title text更改 Windows 应用商店应用的标题文本
【发布时间】:2015-10-28 20:04:08
【问题描述】:

如何更改显示的应用标题? (就像照片一样)

在 Winforms 中为 form1.Text = "new title";

我们如何在 UWP 中做到这一点?

【问题讨论】:

    标签: c# .net xaml windows-store-apps win-universal-app


    【解决方案1】:
    using Windows.UI.ViewManagement;
    
    ...
    
    ApplicationView appView = ApplicationView.GetForCurrentView();
    appView.Title = "Title text goes here";
    

    【讨论】:

    • 解决the issue @Parham.D sees的任何问题,即文本附加了标题?如果我想以编程方式设置它,但没有附加 - AppName,我会怎么做?
    • 我猜有 this sort of complete customizationanother example,几乎都是 this from Microsoft on GitHub 的副本),但这在 imo 中有点矫枉过正。猜猜我现在只会以“错误”的顺序处理应用程序名称。谢谢!
    • 这似乎对我不起作用,GetForCurrentView 给出: System.Exception: 'Element not found。 (来自 HRESULT 的异常:0x80070490)'
    【解决方案2】:

    当我使用ApplicationView 时,它会将Title 附加到程序集名称。

    我们可以在Package.appxmanifest 文件中编辑Application -> Display Name

    【讨论】:

    • 除了在Package.appxmanifest中设置名称外,还需要勾选要显示应用标题的不同logo大小的复选框。
    猜你喜欢
    • 1970-01-01
    • 2016-04-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多