2
我有這樣的XAML如何通過XAML應用樣式超鏈接TextDecorations屬性WPF
<Button.Content>
<Hyperlink>
<Hyperlink.TextDecorations>
<TextDecoration>
<TextDecoration.Pen>
<Pen Thickness="0" />
</TextDecoration.Pen>
</TextDecoration>
</Hyperlink.TextDecorations>
<Run Text="jumped over" />
</Hyperlink>
</Button.Content>
我需要從一個樣式應用於此。我的風格是這樣的
<Style x:Key="Button_Link" TargetType="{x:Type Hyperlink}">
<Setter Property="TextDecorations" >
<Setter.Value>
<TextDecorations>
<TextDecoration>
<TextDecoration.Pen>
<Pen Thickness="0" />
</TextDecoration.Pen>
</TextDecoration>
</TextDecorations>
</Setter.Value>
</Setter>
</Style>
這是導致我的風格文件中的錯誤是用於鬆散XAML
我申請的風格,以超鏈接這樣
Style="{DynamicResource Button_Link}"
Argg ...「導致錯誤」?什麼是錯誤? – Ray 2012-01-05 12:02:45
頁面不會在瀏覽器中呈現 – CodeMe 2012-01-05 12:05:03