0
需要紧急帮助!如何设计Silverlight Toolkit手风琴风格?
我是Silverlight的新手。我将一个新的Accordion控件拖到usercontrol中。我想要做以下的事情
- 改变箭头的位置,从左至右,
- 改变箭头的图片/颜色,
- 更改所选项目标题颜色,
- 创建鼠标悬停效果为一个按钮或文本块(以便它像一个链接)
- 创建上述样式,以便我可以将其应用于我的项目上的任何手风琴。
可以找到任何地方我可以风格的标题。
<toolkit:Accordion>
<toolkit:AccordionItem BorderThickness="0">
<toolkit:AccordionItem.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Width="350" Text="Heading 1" FontWeight="Bold"/>
<TextBlock Margin="80 0 0 0" Style="{StaticResource Link}" >Meer informatie</TextBlock>
</StackPanel>
</toolkit:AccordionItem.Header>
<StackPanel Orientation="Horizontal" Background="#e0e0e0">
<Image Height="130" Source="carriere.jpg" Stretch="Fill"/>
<StackPanel Orientation="Vertical" Margin="10">
<TextBlock Style="{StaticResource H1}">Header 1</TextBlock>
<TextBlock TextWrapping="Wrap" Style="{StaticResource NormalText}" Width="340" Height="70" Margin="0 3 0 3">The header and content properties can be specified in a variety of ways. Listing 1 contains some of the ways that it can be listed.</TextBlock>
<StackPanel Orientation="Horizontal" Margin="0 0 0 2">
<TextBlock Style="{StaticResource Link}" Margin="3 0 3 0" >Link 1</TextBlock>
<TextBlock Style="{StaticResource NormalText}" Margin="3 0 3 0"> | </TextBlock>
<TextBlock Style="{StaticResource Link}" Margin="3 0 3 0">Link 2</TextBlock>
<TextBlock Style="{StaticResource NormalText}" Margin="3 0 3 0"> | </TextBlock>
<TextBlock Style="{StaticResource Link}" Margin="3 0 3 0">Link 3 </TextBlock>
</StackPanel>
</StackPanel>
</StackPanel>
</toolkit:AccordionItem>
</toolkit:Accordion>
尽管此链接可能会回答问题,但最好在此处包含答案的基本部分,并提供供参考的链接。如果链接页面更改,则仅链接答案可能会失效。 – Cairnarvon 2014-09-25 16:48:39
@Cairnarvon这是在2010年,当时我刚开始使用stackoverflow。但你可以按照你的建议编辑答案:) – 2014-09-26 10:49:48