.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

WPF: To change the ListView highlight style, what Targettype we should target?

Posted By:      Posted Date: September 04, 2010    Points: 0   Category :WPF
we want to change all list controls (listBox and listView) highlight style by change its border and background. For ListBox, we target to ListBoxItem. it works great. For ListView, we target to LisViewItem, it does not work. What TargetType we should target to? thx! <Style TargetType="{x:Type ListViewItem}"> <Setter Property="Background" Value="Transparent" /> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="Foreground" Value="Blue" /> <Setter Property="Margin" Value="5,0,5,0" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListViewItem}"> <Border x:Name="Bd" Background="Transparent" CornerRadius="3" SnapsToDevicePixels="true" BorderBrush="{x:Null}"> <ContentPresenter HorizontalAlignment="Left" VerticalAlignment="Center" SnapsToDevicePixel

View Complete Post

More Related Resource Links

How can no-flicked listview change the highlight position quickly


I build a listview which can add and clear items quickly without flicked effect. I filter the EraseBackground message to acheive this purpose.I want to keep the selected item highlighted until I select another item.using the following code, I can acheive the result but having defects.

int selectedindex=-1;

private void ListViewNF_MouseClick(object sender, MouseEventArgs e)
            if (selectedindex != -1)
                cancelSelectedListitem = this.Items[selectedindex];
                if (selectedindex % 2 == 0)
                    cancelSelectedListitem.BackColor = Color.White;

Is it possible to change the title bar background and the font style on default template?



Is there any way to change the default top link /title bar picture and the fonts of the title without breaking anything in the layout/structure?

I have changed the theme to Obsedian and I would also like to change the picture of the title bar of this theme and also the font/style of the title, top link bar, menus..etc. Is there a way to do this?

Please note: I am using WSS 3.0 and I am not the Administrator of the sharepoint. I am only the site admin of some sites on this sharepoint. I can do some basic customization using SPD.

Basically, what I am trying to do is that I want to set up a sharepoint site, however I want to make it NOT look like a sharepoint site.Well I know this is possible, but for my case it might be just partially possible due to the limitation that I am not the Site collection admin and hence I do not have direct access to the server itself.

What I want is to hide most of the sharepoint links/menus/bars, etc and use my own buttons/hyperlinks etc .. for user to navigate on the sites.

Thanks in advance for your help/advices.



change form target from javascript


Salam to all,

in my page, i have an iframe which have a src for another page,

the inner page have a Forms, buttons.. ..etc. the target for the form in the inner page is "self"

i need to run a javascript code from the parent page to change the  inner page form target to posted the values in a Blank window.

how can i do that ?


Change "View Report" button style

Hi,    How can i change the style of button "View Report" ? I want to change the image.     Tks!    

Regarding WPF Line Series Chart how to set this