Click here to Skip to main content
15,889,034 members
Home / Discussions / WPF
   

WPF

 
Questiondatagrid collection Pin
michaelgr111-Apr-12 8:53
michaelgr111-Apr-12 8:53 
QuestionBinding TextBox to DataGrid - WPF C# Pin
Sutton Mehaffey11-Apr-12 7:04
Sutton Mehaffey11-Apr-12 7:04 
QuestionTimer Pin
pix_programmer10-Apr-12 6:40
pix_programmer10-Apr-12 6:40 
AnswerRe: Timer Pin
Mycroft Holmes10-Apr-12 13:07
professionalMycroft Holmes10-Apr-12 13:07 
GeneralRe: Timer Pin
Pete O'Hanlon10-Apr-12 20:27
mvePete O'Hanlon10-Apr-12 20:27 
GeneralRe: Timer Pin
Mycroft Holmes10-Apr-12 20:48
professionalMycroft Holmes10-Apr-12 20:48 
AnswerRe: Timer Pin
Andy41111-Apr-12 2:37
Andy41111-Apr-12 2:37 
QuestionAnother WPF Styling Question Pin
Kevin Marois10-Apr-12 6:02
professionalKevin Marois10-Apr-12 6:02 
Paste this into a window...

<Window.Resources>

    <Style x:Key="SelectionButton3"
           TargetType="{x:Type Button}">

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">

                    <Grid HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          ClipToBounds="False">

                        <Grid.RowDefinitions>
                            <RowDefinition Height="75"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>

                        <Border BorderThickness="0,1.5,1.5,1.5"
                                Background="SteelBlue"
                                Height="35"
                                Grid.Column="1"
                                Grid.Row="0"
                                Margin="-31"
                                BorderBrush="DarkSlateBlue">

                            <Border.BitmapEffect>
                                <DropShadowBitmapEffect ShadowDepth="4"/>
                            </Border.BitmapEffect>

                        </Border>

                        <Rectangle Fill="SteelBlue"
                                   Stroke="DarkSlateBlue"
                                   Grid.Row="0"
                                   Grid.Column="0">

                            <Rectangle.LayoutTransform>
                                <RotateTransform Angle="-45" />
                            </Rectangle.LayoutTransform>

                            <Rectangle.BitmapEffect>
                                <DropShadowBitmapEffect ShadowDepth="5"/>
                            </Rectangle.BitmapEffect>

                        </Rectangle>

                        <ContentPresenter x:Name="ContentArea"
                                          VerticalAlignment="Center"
                                          HorizontalAlignment="Center"
                                          Content="{Binding Path=Content, RelativeSource={RelativeSource TemplatedParent}}" />
                    </Grid>

                </ControlTemplate>
            </Setter.Value>

        </Setter>

        <Setter Property="Foreground"
                Value="LightGray" />
        <Setter Property="FontFamily"
                Value="Segoe UI" />

    </Style>

</Window.Resources>

<Grid Margin="50">

    <Button Click="Button_Click"
            Style="{StaticResource SelectionButton3}"
            Width="185">
    </Button>

</Grid>


You see that both the rectangle and the border have drop shadows. How can I make the borders drop shadow only appear when the mouse is over any part of the control?

Thanks
Everything makes sense in someone's mind

AnswerRe: Another WPF Styling Question Pin
Mycroft Holmes10-Apr-12 13:05
professionalMycroft Holmes10-Apr-12 13:05 
GeneralRe: Another WPF Styling Question Pin
Wes Aday10-Apr-12 13:27
professionalWes Aday10-Apr-12 13:27 
AnswerRe: Another WPF Styling Question Pin
Abhinav S10-Apr-12 21:23
Abhinav S10-Apr-12 21:23 
QuestionEventHandler for Pictrue Control in Windows Phone Pin
pix_programmer10-Apr-12 2:54
pix_programmer10-Apr-12 2:54 
AnswerRe: EventHandler for Pictrue Control in Windows Phone Pin
Pete O'Hanlon10-Apr-12 3:05
mvePete O'Hanlon10-Apr-12 3:05 
QuestionWPF, uncompiled XAML and scripting? Pin
Antonino Porcino9-Apr-12 21:26
Antonino Porcino9-Apr-12 21:26 
AnswerRe: WPF, uncompiled XAML and scripting? Pin
Abhinav S9-Apr-12 22:06
Abhinav S9-Apr-12 22:06 
GeneralRe: WPF, uncompiled XAML and scripting? Pin
Antonino Porcino9-Apr-12 22:19
Antonino Porcino9-Apr-12 22:19 
AnswerRe: WPF, uncompiled XAML and scripting? Pin
Mycroft Holmes10-Apr-12 0:53
professionalMycroft Holmes10-Apr-12 0:53 
GeneralRe: WPF, uncompiled XAML and scripting? Pin
Antonino Porcino10-Apr-12 2:12
Antonino Porcino10-Apr-12 2:12 
AnswerRe: WPF, uncompiled XAML and scripting? Pin
Wes Aday10-Apr-12 3:33
professionalWes Aday10-Apr-12 3:33 
GeneralRe: WPF, uncompiled XAML and scripting? Pin
Antonino Porcino10-Apr-12 7:07
Antonino Porcino10-Apr-12 7:07 
QuestionPRISM RaisePropertyChanged Pin
mi_n9-Apr-12 17:35
mi_n9-Apr-12 17:35 
QuestionBinding not initially filling in List of data Pin
Sutton Mehaffey9-Apr-12 7:32
Sutton Mehaffey9-Apr-12 7:32 
Questionboolean attached property Pin
michaelgr19-Apr-12 7:10
michaelgr19-Apr-12 7:10 
Question2 WPF Style Questions Pin
Kevin Marois9-Apr-12 7:09
professionalKevin Marois9-Apr-12 7:09 
AnswerRe: 2 WPF Style Questions Pin
Bernhard Hiller10-Apr-12 0:06
Bernhard Hiller10-Apr-12 0:06 

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.