Click here to Skip to main content
15,888,065 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Text Hotlinks in WPF Pin
Pete O'Hanlon25-Jan-09 22:37
mvePete O'Hanlon25-Jan-09 22:37 
GeneralRe: Text Hotlinks in WPF Pin
Jammer25-Jan-09 23:19
Jammer25-Jan-09 23:19 
GeneralRe: Text Hotlinks in WPF Pin
BlitzPackage26-Jan-09 5:22
BlitzPackage26-Jan-09 5:22 
GeneralRe: Text Hotlinks in WPF Pin
Pete O'Hanlon26-Jan-09 8:20
mvePete O'Hanlon26-Jan-09 8:20 
GeneralRe: Text Hotlinks in WPF Pin
Ray Cassick27-Jan-09 10:06
Ray Cassick27-Jan-09 10:06 
GeneralRe: Text Hotlinks in WPF Pin
Pete O'Hanlon27-Jan-09 10:09
mvePete O'Hanlon27-Jan-09 10:09 
GeneralRe: Text Hotlinks in WPF Pin
Ray Cassick27-Jan-09 10:12
Ray Cassick27-Jan-09 10:12 
GeneralRe: Text Hotlinks in WPF Pin
Pete O'Hanlon26-Jan-09 2:24
mvePete O'Hanlon26-Jan-09 2:24 
Here's a XAML version that underlines the text when the mouse is over the label. By default, the effects are removed when the mouse leaves the area, so you don't need to handle the leaving events.
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel>
  <TextBlock>Font underline sample.</TextBlock>
  <TextBlock x:Name="myLink" Text="Click here">
    <TextBlock.Style>
      <Style>
        <Style.Triggers>
          <Trigger Property="TextBlock.IsMouseOver" Value="True">
            <Setter Property="TextBlock.TextDecorations" Value="Underline" />
            <Setter Property="TextBlock.Foreground" Value="Blue" />
          </Trigger>
        </Style.Triggers>
      </Style>
    </TextBlock.Style>
  </TextBlock>
</StackPanel>
</Page>
All that you need to add is the click event handling.

"WPF has many lovers. It's a veritable porn star!" - Josh Smith

My blog | My articles | MoXAML PowerToys



GeneralRe: Text Hotlinks in WPF Pin
BlitzPackage26-Jan-09 5:23
BlitzPackage26-Jan-09 5:23 
Questionellipse rendertransform Pin
hotthoughtguy24-Jan-09 6:15
hotthoughtguy24-Jan-09 6:15 
AnswerRe: ellipse rendertransform Pin
Mark Salsbery25-Jan-09 8:04
Mark Salsbery25-Jan-09 8:04 
QuestionChannel9 Silverlight Videos Pin
Kevin McFarlane24-Jan-09 4:07
Kevin McFarlane24-Jan-09 4:07 
AnswerRe: Channel9 Silverlight Videos Pin
DaveX8624-Jan-09 4:53
DaveX8624-Jan-09 4:53 
GeneralRe: Channel9 Silverlight Videos Pin
Kevin McFarlane24-Jan-09 5:22
Kevin McFarlane24-Jan-09 5:22 
GeneralRe: Channel9 Silverlight Videos Pin
DaveX8624-Jan-09 5:27
DaveX8624-Jan-09 5:27 
AnswerRe: Channel9 Silverlight Videos Pin
Mark Salsbery25-Jan-09 7:46
Mark Salsbery25-Jan-09 7:46 
AnswerRe: Channel9 Silverlight Videos Pin
Syed Mehroz Alam30-Jan-09 0:13
Syed Mehroz Alam30-Jan-09 0:13 
QuestionUserControl Error ! Pin
Mohammad Dayyan23-Jan-09 8:45
Mohammad Dayyan23-Jan-09 8:45 
AnswerRe: UserControl Error ! Pin
User 27100924-Jan-09 3:48
User 27100924-Jan-09 3:48 
QuestionWPF templates, styles, triggers, et al... Pin
Ray Cassick23-Jan-09 7:20
Ray Cassick23-Jan-09 7:20 
AnswerRe: WPF templates, styles, triggers, et al... Pin
Pete O'Hanlon23-Jan-09 8:23
mvePete O'Hanlon23-Jan-09 8:23 
AnswerRe: WPF templates, styles, triggers, et al... Pin
Mark Salsbery25-Jan-09 8:15
Mark Salsbery25-Jan-09 8:15 
QuestionConvert 2D image into 3D image using WPF Pin
ravi.vellanky22-Jan-09 21:00
ravi.vellanky22-Jan-09 21:00 
AnswerRe: Convert 2D image into 3D image using WPF Pin
Pete O'Hanlon22-Jan-09 22:18
mvePete O'Hanlon22-Jan-09 22:18 
GeneralRe: Convert 2D image into 3D image using WPF Pin
ravi.vellanky22-Jan-09 22:59
ravi.vellanky22-Jan-09 22:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.