Xamarin表单:在App.xaml文件中定义数据模板的内存使用情况
如果我在Xamarin表单:在App.xaml文件中定义数据模板的内存使用情况,xamarin,memory,xamarin.forms,datatemplate,xamarin.forms.listview,Xamarin,Memory,Xamarin.forms,Datatemplate,Xamarin.forms.listview,如果我在App.xaml中定义一个数据模板,而不是在Page.xaml或ListView中定义,它会整体增加内存使用量吗?否,它不应该整体增加内存使用量 在App.xaml中定义内容会增加应用程序的启动时间,因为当应用程序首次运行时,应用程序必须加载App.xaml页面中的所有内容 但是,如果您在多个页面上使用相同的DataTemplate,那么在App.xaml中定义它可以提高总体性能 您可以尝试使用,以自己找出差异所在(需要Visual Studio Enterprise订阅)
App.xaml
中定义一个数据模板,而不是在Page.xaml
或ListView
中定义,它会整体增加内存使用量吗?否,它不应该整体增加内存使用量
在App.xaml
中定义内容会增加应用程序的启动时间,因为当应用程序首次运行时,应用程序必须加载App.xaml
页面中的所有内容
但是,如果您在多个页面上使用相同的DataTemplate
,那么在App.xaml
中定义它可以提高总体性能
您可以尝试使用,以自己找出差异所在(需要Visual Studio Enterprise订阅)