0

新しいWindows8C#Metroプロジェクトにはそれぞれ、さまざまなコントロール用の多くのスタイルとテンプレートを含むStandardStyles.xamlファイルが含まれています。ほとんどの場合、私はそれらの10%しか使用せず、独自のスタイルをたくさん定義しています。

未使用のスタイルをすべて簡単かつ安全に検索および/または削除するのは簡単ですか?私の知る限り、長いXAMLファイルを解析すると、Windows 8アプリの起動時間が長くなりますが、これは避けたいと思います。それとも、1800行のコードを気にする必要はないと思いますか?

4

1 に答える 1

3

ヘッダーのコメントは、かなり良いアイデアを提供します。

This file contains XAML styles that simplify application development.

These are not merely convenient, but are required by most Visual Studio project and item templates.
Removing, renaming, or otherwise modifying the content of these files may result in a project that
does not build, or that will not build once additional pages are added.  If variations on these
styles are desired it is recommended that you copy the content under a new name and modify your
private copy.

ファイルを変更して後で別のビューを追加すると、機能していないビューで立ち往生する可能性があり、再追加す​​る必要があるスタイルを見つけ出す必要があります。

このファイルのオーバーヘッドは小さく、他のほとんどすべての XAML アプリのオーバーヘッドは同じであるため、起動時間にどのように影響するかについて心配する必要はありません。

于 2012-10-20T18:07:17.123 に答える