Click here to Skip to main content
15,443,175 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Weird behavior styling a Border Pin
#realJSOP24-Apr-09 2:07
mva#realJSOP24-Apr-09 2:07 
GeneralRe: Weird behavior styling a Border Pin
Foxandxss23-Apr-09 23:40
MemberFoxandxss23-Apr-09 23:40 
AnswerRe: WPF DateTime picker Pin
#realJSOP23-Apr-09 10:48
mva#realJSOP23-Apr-09 10:48 
AnswerRe: WPF DateTime picker Pin
Mark Salsbery23-Apr-09 11:16
MemberMark Salsbery23-Apr-09 11:16 
GeneralRe: WPF DateTime picker Pin
Mark Salsbery23-Apr-09 12:40
MemberMark Salsbery23-Apr-09 12:40 
GeneralRe: WPF DateTime picker Pin
Mark Salsbery24-Apr-09 6:01
MemberMark Salsbery24-Apr-09 6:01 
Questione.currentTarget in WPF? Pin
emptythetill23-Apr-09 8:52
Memberemptythetill23-Apr-09 8:52 
AnswerRe: e.currentTarget in WPF? Pin
Pete O'Hanlon24-Apr-09 2:11
mvaPete O'Hanlon24-Apr-09 2:11 
This is trivial in WPF. All you need do is declare a storyboard inside a trigger that applys to the button type. Here's a simple example:
<Page
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <Page.Resources>
    <Style TargetType="{x:Type Button}">
      <Style.Triggers>
        <Trigger Property="IsMouseOver" Value="True">
          <Trigger.EnterActions>
            <BeginStoryboard>
              <Storyboard>
                <DoubleAnimation Storyboard.TargetProperty="Opacity" To="0.20" Duration="0:0:0.5" />
              </Storyboard>
            </BeginStoryboard>
          </Trigger.EnterActions>
          <Trigger.ExitActions>
            <BeginStoryboard>
              <Storyboard>
                <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.5" />
              </Storyboard>
            </BeginStoryboard>
          </Trigger.ExitActions>
        </Trigger>
      </Style.Triggers>
    </Style>
  </Page.Resources>
  <StackPanel>  
    <Button Content="Hello" />
    <Button Content="Hello 2" />
  </StackPanel>
</Page>


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

As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.


My blog | My articles | MoXAML PowerToys | Onyx



GeneralRe: e.currentTarget in WPF? Pin
emptythetill24-Apr-09 3:48
Memberemptythetill24-Apr-09 3:48 
GeneralRe: e.currentTarget in WPF? Pin
Pete O'Hanlon24-Apr-09 4:30
mvaPete O'Hanlon24-Apr-09 4:30 
QuestionData Binding Problem [modified] Pin
#realJSOP23-Apr-09 7:52
mva#realJSOP23-Apr-09 7:52 
AnswerRe: Data Binding Problem Pin
#realJSOP23-Apr-09 8:35
mva#realJSOP23-Apr-09 8:35 
AnswerRe: Data Binding Problem Pin
Christian Graus23-Apr-09 10:10
mveChristian Graus23-Apr-09 10:10 
GeneralRe: Data Binding Problem Pin
#realJSOP23-Apr-09 10:21
mva#realJSOP23-Apr-09 10:21 
GeneralRe: Data Binding Problem Pin
Christian Graus23-Apr-09 10:50
mveChristian Graus23-Apr-09 10:50 
GeneralRe: Data Binding Problem Pin
Mark Salsbery23-Apr-09 11:21
MemberMark Salsbery23-Apr-09 11:21 
GeneralRe: Data Binding Problem Pin
#realJSOP23-Apr-09 13:50
mva#realJSOP23-Apr-09 13:50 
GeneralRe: Data Binding Problem Pin
#realJSOP24-Apr-09 2:56
mva#realJSOP24-Apr-09 2:56 
GeneralRe: Data Binding Problem Pin
Mark Salsbery24-Apr-09 6:45
MemberMark Salsbery24-Apr-09 6:45 
GeneralRe: Data Binding Problem Pin
#realJSOP24-Apr-09 10:25
mva#realJSOP24-Apr-09 10:25 
GeneralRe: Data Binding Problem [modified] Pin
Mark Salsbery24-Apr-09 10:52
MemberMark Salsbery24-Apr-09 10:52 
GeneralRe: Data Binding Problem Pin
#realJSOP25-Apr-09 2:52
mva#realJSOP25-Apr-09 2:52 
GeneralRe: Data Binding Problem Pin
Mark Salsbery25-Apr-09 6:58
MemberMark Salsbery25-Apr-09 6:58 
QuestionMaking a template for a ListView in WPF ? Pin
Mohammad Dayyan23-Apr-09 4:55
MemberMohammad Dayyan23-Apr-09 4:55 
QuestionRe: Making a template for a ListView in WPF ? Pin
Mark Salsbery23-Apr-09 7:04
MemberMark Salsbery23-Apr-09 7:04 

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.