我正在研究Windows Phone 8.1中的Pivot控件我设置前景属性pivotitem标题到红色它工作正常但是,我将所有项目标题设置为红色和项目标题的不透明度永远不会更改未聚焦的数据透视图云请帮助我如何解决这个
问题.这是代码
<Pivot Title="Pivot Title" >
<PivotItem >
<PivotItem.Header >
<TextBlock Text="One" Foreground="Red" FontSize="48"/>
</PivotItem.Header>
</PivotItem>
<PivotItem>
<PivotItem.Header>
<TextBlock Text="two" Foreground="Red" FontSize="48"/>
</PivotItem.Header>
</PivotItem>
<PivotItem>
<PivotItem.Header>
<TextBlock Text="three" Foreground="Red" FontSize="48"/>
</PivotItem.Header>
</PivotItem>
</Pivot>
Run Code Online (Sandbox Code Playgroud) 我有一个Listbox与一些Listboxitem,我想改变所有项目的风格.我知道,可以在资源中创建一个样式并将这个样式绑定到每个项目,但也许有可能这样做更容易(没有绑定)?使用ListBox.ItemTemplate?
<ListBox SelectionChanged="ListBox_SelectionChanged">
<ListBoxItem x:Name="ItemAdress">
....
</ListBoxItem>
<ListBoxItem x:Name="ItemPhone">
....
</ListBoxItem>
<ListBoxItem x:Name="ItemEmail">
....
</ListBoxItem>
</Listbox>
Run Code Online (Sandbox Code Playgroud)
事实上,我的目标是为每个项目添加保证金底部15.(在项目之间添加空格)