Click here to Skip to main content
11,494,407 members (73,496 online)

Silverlight / WPF

 
GeneralRe: WPF Tab Styling Question #2 Pin
Pete O'Hanlon2-Jan-13 0:08
protectorPete O'Hanlon2-Jan-13 0:08 
GeneralRe: WPF Tab Styling Question #2 Pin
Kevin Marois2-Jan-13 16:41
memberKevin Marois2-Jan-13 16:41 
GeneralRe: WPF Tab Styling Question #2 Pin
Pete O'Hanlon2-Jan-13 22:05
protectorPete O'Hanlon2-Jan-13 22:05 
GeneralRe: WPF Tab Styling Question #2 Pin
Kevin Marois2-Jan-13 22:40
memberKevin Marois2-Jan-13 22:40 
QuestionWPF TabItem Styling Question Pin
Kevin Marois30-Dec-12 12:16
memberKevin Marois30-Dec-12 12:16 
AnswerRe: WPF TabItem Styling Question Pin
Pete O'Hanlon30-Dec-12 12:40
protectorPete O'Hanlon30-Dec-12 12:40 
GeneralRe: WPF TabItem Styling Question Pin
Kevin Marois30-Dec-12 16:16
memberKevin Marois30-Dec-12 16:16 
QuestionList Item Fore & Back Colors Pin
Kevin Marois29-Dec-12 8:52
memberKevin Marois29-Dec-12 8:52 
[UPDATE] Found it..



I have a listbox with hyperlinks as the list items. But the selected item is a blue bar with white text. I'd like to remove the highlighting. Here's what I have so far:

<UserControl.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="..\Resources.xaml"/>
        </ResourceDictionary.MergedDictionaries>
 
        <Style TargetType="{x:Type TreeViewItem}">
            <Style.Triggers>
                <Trigger Property="IsMouseCaptureWithin" Value="True">
                    <Setter Property="IsSelected" Value="True" />
                </Trigger>
                <Trigger Property="IsKeyboardFocusWithin" Value="True">
                    <Setter Property="IsSelected" Value="True" />
                </Trigger>
            </Style.Triggers>
        </Style>
 
        <DataTemplate DataType="{x:Type models:JobModel}">
            <StackPanel Orientation="Horizontal"
                        Margin="2">
                <Image Source="/FMG.UI.WPF;component/Media/Images/job_72.png"
					    Height="16"
					    Width="16"
                        Margin="0,0,3,0"/>
                <controls:TextBlockEx>
                    <Hyperlink Style="{StaticResource linkStyle}"
                                Command="{Binding SelectedJob, Mode=TwoWay}">
                        <TextBlock Text="{Binding JobNumber}"/>
                    </Hyperlink>
                </controls:TextBlockEx>
            </StackPanel>
        </DataTemplate>
 
    </ResourceDictionary>
</UserControl.Resources>
    

and

<ListBox Grid.Row="1"
            Grid.Column="0"
            ItemsSource="{Binding Jobs}"
            SelectedItem="{Binding SelectedJob}"
            BorderThickness="1"
            BorderBrush="#6593CF"
            Margin="-1,0,-1,-1">
 
    <ListBox.Resources>
        <Style TargetType="{x:Type ListBoxItem}">
            <Style.Triggers>
                <Trigger Property="IsSelected" Value="True">
                    <Setter Property="Foreground" Value="Red"/>
                    <Setter Property="Background" Value="Transparent"/>
                </Trigger>
            </Style.Triggers>
        </Style>
    </ListBox.Resources>
 
</ListBox>

Can someone show me how to remove the selected item's fore & back color so it ddoesn't appear selected?

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

QuestionMVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
Member 137073829-Dec-12 2:58
memberMember 137073829-Dec-12 2:58 
AnswerRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
SledgeHammer0129-Dec-12 8:22
memberSledgeHammer0129-Dec-12 8:22 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
Member 137073829-Dec-12 16:44
memberMember 137073829-Dec-12 16:44 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
SledgeHammer0129-Dec-12 17:26
memberSledgeHammer0129-Dec-12 17:26 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
Member 137073829-Dec-12 18:00
memberMember 137073829-Dec-12 18:00 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
SledgeHammer0129-Dec-12 18:25
memberSledgeHammer0129-Dec-12 18:25 
GeneralRe: MVVM:How to bind the MenuItem Command of ListBoxItem ContextMenu dynamically? Pin
Member 137073829-Dec-12 20:02
memberMember 137073829-Dec-12 20:02 
Questionmm Pin
Aishwarya aishu28-Dec-12 1:44
memberAishwarya aishu28-Dec-12 1:44 
AnswerRe: mm Pin
Richard MacCutchan28-Dec-12 6:59
mvpRichard MacCutchan28-Dec-12 6:59 
Generalsiverlight Pin
Aishwarya aishu28-Dec-12 1:42
memberAishwarya aishu28-Dec-12 1:42 
GeneralRe: siverlight Pin
Richard MacCutchan28-Dec-12 6:57
mvpRichard MacCutchan28-Dec-12 6:57 
QuestionDataTrigger bind to a Property Pin
mbv80023-Dec-12 18:01
membermbv80023-Dec-12 18:01 
AnswerRe: DataTrigger bind to a Property Pin
Pete O'Hanlon23-Dec-12 20:17
protectorPete O'Hanlon23-Dec-12 20:17 
AnswerRe: DataTrigger bind to a Property Pin
Wayne Gaylard23-Dec-12 20:39
mentorWayne Gaylard23-Dec-12 20:39 
QuestionWPF Adorner Issues Pin
John Simmons / outlaw programmer17-Dec-12 11:52
mvpJohn Simmons / outlaw programmer17-Dec-12 11:52 
AnswerRe: WPF Adorner Issues Pin
SledgeHammer0118-Dec-12 5:49
memberSledgeHammer0118-Dec-12 5:49 
GeneralRe: WPF Adorner Issues Pin
John Simmons / outlaw programmer20-Dec-12 10:09
mvpJohn Simmons / outlaw programmer20-Dec-12 10:09 

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

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


Advertise | Privacy | Mobile
Web01 | 2.8.150520.1 | Last Updated 28 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid