确定样式的来源? [英] Determine where a style comes from?

查看:87
本文介绍了确定样式的来源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我习惯的HTML / CSS世界中,我可以使用Chrome来检查我页面上的项目,并确切地找出给定属性(颜色等)的样式。我在XAML中找不到办法做到这一点?仅仅是StandardStyles.xaml是多层次的
(大量的"BasedOn"),就像CSS经常一样。我觉得我希望能够点击项目中的样式属性,并能够导航到正在设置它的样式。我可以这样做吗?

In the HTML/CSS world that I'm used to, I can use Chrome to inspect an item on my page and find out exactly where a given property (colour etc), is being styled from. I can't find a way to do this in XAML? It's just that StandardStyles.xaml is considerably multi layered (lots of "BasedOn"), in the same way CSS often is. I feel like I want to be able to click on a styled property in an item and be able to navigate to the Style where it is being set. Can I do this?

特别是在这个例子中,我正在尝试替换应用程序周围的所有灰色,这似乎与向导网格应用程序一起提供。我的图标,闪屏,网格项目等的背景。但我无法确定它来自何处。

Specifically in this instance, I'm trying to replace all the grey around the app that seems to come with the wizard grid app. The background of my icons, splashscreen, grid items etc.. But I can't figure where it's coming from.

 

推荐答案

在向导网格应用中,磁贴正在获取颜色,因为它们指的是资产文件夹中存在的图像。

In the Wizard grid app tiles are getting colors because they are referring to images that are present in the asset folder.

如果在构造函数(SampleDataSource())中观察到DataModel / SampleDataSource.CS,则它们将创建示例数据项对象,其第四个参数是该特定项的图像路径。每个样本数据项都会添加到样本数据组
中,以便您可以更改切片的颜色,也可以通过更改样本数据项的第四个参数将它们替换为您自己的图像。

If you observe DataModel/SampleDataSource.CS in the constructor(SampleDataSource()) they are creating sample data item objects whose fourth parameter is the path of the image for that particular item. Each sample data item is added to a sample data group so you can change the colors of the tiles or you can replace them with your own images by changing the fourth parameter of the sample data item.

2。如果你观察到"普通"中出现的StandardStyles.xaml解决方案的文件夹有一个数据模板"Standard250x250ItemTemplate"。在那里,您可以更改图块上显示的标题和副标题。

2. if you observe the StandardStyles.xaml present in "common" folder of the solution there is a data template "Standard250x250ItemTemplate" present there you can change the title and subtitle which is present on the tile.

3.如果您在应用程序中观察package.appxmanifest,请转到applicationUI选项卡,您可以观察背景颜色属性。通过修改那里的值,您可以更改闪屏颜色。

3.if you observe the package.appxmanifest in the application go to applicationUI tab there you can observe the background color property. By modifying the value there you can change the splash screen color.

谢谢

Raja KPV

"


这篇关于确定样式的来源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆