Click here to Skip to main content
15,914,066 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: WPF Stream Live Video Pin
Kevin Marois2-Jun-15 5:22
professionalKevin Marois2-Jun-15 5:22 
QuestionHow to change Window.Title property? Pin
econy28-May-15 3:13
econy28-May-15 3:13 
AnswerRe: How to change Window.Title property? Pin
Richard Deeming28-May-15 3:48
mveRichard Deeming28-May-15 3:48 
QuestionThe difference of Style on Button and TextBlock, Pin
econy27-May-15 10:15
econy27-May-15 10:15 
AnswerRe: The difference of Style on Button and TextBlock, Pin
Mycroft Holmes27-May-15 13:02
professionalMycroft Holmes27-May-15 13:02 
GeneralRe: The difference of Style on Button and TextBlock, Pin
econy28-May-15 3:10
econy28-May-15 3:10 
AnswerRe: The difference of Style on Button and TextBlock, Pin
Gerry Schmitz1-Jun-15 11:02
mveGerry Schmitz1-Jun-15 11:02 
QuestionWPF ListBoxItem Style Not Working Pin
Kevin Marois26-May-15 9:48
professionalKevin Marois26-May-15 9:48 
I have a Border inside a DataTemplate for a ListBox. When the mouse is over the item, I want to show the Border. Here's my XAML:
<ListBox Grid.Row="3"
            Grid.Column="0"
            ItemsSource="{Binding Devices}"
            SelectedItem="{Binding SelectedDevice}"
            MaxWidth="350">

    <ListBox.Resources>
        <Style TargetType="ListBoxItem">
            <Style.Resources>
                <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent"/>
                <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent"/>
                <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black"/>
            </Style.Resources>
        </Style>
    </ListBox.Resources>

    <ListBox.ItemTemplate>
        <DataTemplate>

            <Border BorderBrush="SteelBlue"
                    BorderThickness="0"
                    HorizontalAlignment="Stretch"
                    CornerRadius="3"
                    MinHeight="65"
                    Margin="3">

                <Border.Style>
                    <Style>
                        <Style.Triggers>
                            <Trigger Property="Border.IsMouseOver" Value="True">
                                <Setter Property="Border.BorderThickness" Value="1" />
                            </Trigger>
                        </Style.Triggers>
                    </Style>
                </Border.Style>

                <Grid>

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

                    <Image Grid.Row="0" 
                            Grid.RowSpan="2"
                            Grid.Column="0"
                            Source="/DFT.Falcon6.UI.Desktop;component/Media/Images/fc6logo.png"
                            Height="50"
                            Width="50"
                            Margin="5"/>
                    <TextBlock Grid.Row="0"
                                Grid.Column="1"
                                Text="{Binding UnitIdentifier}"
                                Style="{StaticResource devicetextStyle}"
                                Margin="2"/>
                    <TextBlock Grid.Row="1"
                                Grid.Column="1"
                                Text="{Binding IPAddress}"
                                Style="{StaticResource devicetextStyle}"
                                Margin="2"/>

                </Grid>

            </Border>

        </DataTemplate>
    </ListBox.ItemTemplate>

</ListBox>

You can see that I have a trigger defined in the Border control to set the BorderThickness to 1. However when I run it and mouse over the item, nothing happens.

What am I doing wrong here?

Thanks
If it's not broken, fix it until it is

QuestionPost Publish Actions Pin
Mycroft Holmes21-May-15 16:32
professionalMycroft Holmes21-May-15 16:32 
QuestionRe: Post Publish Actions Pin
Kenneth Haugland22-May-15 10:08
mvaKenneth Haugland22-May-15 10:08 
AnswerRe: Post Publish Actions Pin
Mycroft Holmes22-May-15 13:42
professionalMycroft Holmes22-May-15 13:42 
QuestionNeed Entity Framework Video Tutorial using WPF Pin
Ashfaque Hussain21-May-15 1:09
Ashfaque Hussain21-May-15 1:09 
QuestionRe: Need Entity Framework Video Tutorial using WPF Pin
Richard MacCutchan21-May-15 1:29
mveRichard MacCutchan21-May-15 1:29 
AnswerRe: Need Entity Framework Video Tutorial using WPF Pin
Ashfaque Hussain21-May-15 1:50
Ashfaque Hussain21-May-15 1:50 
SuggestionWPF App for Tablet Pin
Member 1160551220-May-15 23:50
Member 1160551220-May-15 23:50 
Questionwindow set fontsize question Pin
econy20-May-15 4:09
econy20-May-15 4:09 
AnswerRe: window set fontsize question Pin
Richard Deeming20-May-15 4:48
mveRichard Deeming20-May-15 4:48 
GeneralRe: window set fontsize question Pin
econy20-May-15 5:13
econy20-May-15 5:13 
QuestionTreeview with check box binding in silverlight Pin
Member 1151284413-May-15 23:02
Member 1151284413-May-15 23:02 
AnswerRe: Treeview with check box binding in silverlight Pin
Kenneth Haugland14-May-15 18:57
mvaKenneth Haugland14-May-15 18:57 
QuestionWPF Rotary Button Control Pin
Kevin Marois12-May-15 12:09
professionalKevin Marois12-May-15 12:09 
AnswerRe: WPF Rotary Button Control Pin
Richard Deeming13-May-15 1:23
mveRichard Deeming13-May-15 1:23 
AnswerRe: WPF Rotary Button Control Pin
Kenneth Haugland13-May-15 1:27
mvaKenneth Haugland13-May-15 1:27 
GeneralRe: WPF Rotary Button Control Pin
Kevin Marois13-May-15 3:47
professionalKevin Marois13-May-15 3:47 
GeneralRe: WPF Rotary Button Control Pin
Kenneth Haugland13-May-15 4:07
mvaKenneth Haugland13-May-15 4:07 

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.