代碼使用超級鏈接下面寫在一個TextBlock
<TextBlock FontFamily="Arial" Width="450"
Text="Posted In" Foreground="Red"
TextAlignment="Left" TextWrapping="Wrap">
<Run Foreground="Red" Text="{Binding CategoryName}"></Run>
<Run Foreground="Red" Text="{Binding CreatedOn}"></Run>
<LineBreak/>
<LineBreak/>
<Run
Foreground="Black"
FontSize="24"
Text="{Binding ArticleDescription}"></Run>
<LineBreak/>
<LineBreak/>
<Run Foreground="Red" Text="Posted By"></Run>
<Run Foreground="Red" Text="{Binding CreatedBy}"></Run>
<Hyperlink Foreground="Red">sadas</Hyperlink>
</TextBlock>
基本上我用這個代碼,如果我使用超級鏈接它的應用程序崩潰。如果我不使用超鏈接,那麼應用程序完全正常工作。我如何在文本塊中使用超鏈接?
錯誤消息:
錯誤HRESULT E_FAIL已經從對COM組件的調用返回。
我嘗試這兩個鏈接,但應用程序崩潰 – 2014-11-05 10:06:05
鏈接解決方案是偉大的。顯示答案中需要做的事情甚至更好。 http://stackoverflow.com/help/how-to-answer – Florian 2014-11-05 10:08:50