.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

How can I highlight entire horizontal row span of selcted WPF TreeView item in containng window?

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :WPF
I have created a TreeView inside a UserControl in my project. By default if one selects a TreeViewItem, then the entire row is highlighted but with in the tree, e.g.-----------------------|   + A123            ||      + B123         | |      + ///////        ||   + A234            |----------------------- Where "///////" is highlighted/selected TreeViewItem. What should I do to make the selection/highlighted area to span over entire window horizontally? e.g. ----------------------- |   + A123            | |      + B123         | |/////+//////////////| |   + A234            | -----------------------

View Complete Post

More Related Resource Links

VS2008 and C#: How to create a short cut for a selected item in a ListView/TreeView ?

How to create a short cut for a selected item from a ListView/TreeView ? Is it possible to provide a smaple code ? Thanks,

How can I show Plus sign(Expand mode) Before treeview item in wpf?

Hi,    We are using tree view control in XBAP,in which I m listing all parent node. But it doesnt show plus sign(For expansion) before node header. We have written code to fetch node's child on ItemChanged event.When I click on node and if its have children its showing plus sign.  Do any body know how to show plus sign regardless of whether that node has child or not? Regards, Mehul

Horizontal Scrollbar not fully displayed in report window

I have a report (using SSRS 2005) which displays both the vertical scrollbar and horizontal scrollbar.  The report has lots of columns. The problem is that the horizontal scrollbar is only half displayed (height wise).  I've tried resizing the report window but it doesn't change how much of the horizontal scrollbar is displayed. I've tried playing with the report settings (margins, body size, etc) but can't seem to get the entire horizontal scrollbar to be visible.  The users don't like this because the viewable part is hard to grab onto to scroll. How do I fix this? Thanks, John

i want to disable the entire parent window when the child window is opened?



 i am using the master page from the master page i am opening the child window.so, when ever i opened the child window i want to disable the entire parent window(all the controls present in the parent page) .how can we do it.


Burepalli V S Rao.

How to bind to a WPF TreeView's selected item?



Most of you probably know the excellent MVVM WPF TreeView article by Josh Smith (http://www.codeproject.com/KB/WPF/TreeViewWithViewModel.aspx).

Using the Family Tree demo (Text Search), can someone explain me how to bind a control's property (let's say, a TextBlock's Text property) to the selected item's Name property (PersonViewModel.Name) in the treeview? In essence, if the user clicks on "Sarah Applifunk", the TextBlock would show "Sarah Applifunk". Then if the user clicks on Maurice Winkleford, the TextBlock would update as such.

Of course I would like the TextBlock to look somehow like this:

<TextBlock Text="{Binding SelectedPerson.Name}" />

This *used* to work in my application using the IsSynchronizedWithCurrentItem="True" using lists, but the TreeView is somewhat more complex, isn't it?


sharepoint designer 2010 customize xslt "entire view" or "customize item"


In SharePoint Designer 2010, under Customize XSLT what is the difference between "Customize Entire View" and "Customize Item"

I ask this in part because neither Google nor Bing can find any result for the query ´sharepoint designer 2010 customize xslt "entire view" or "customize item"´

Not able to drop Picked ToolBox Item on ToolEditor Window.


We have a editor designer on a tool window. We have used a WPF usercontrol to contain this designer.
This usercontrol has child control WinformHost which hosts my designer surface which in our case is a Winform Usercontrol.

In short

(Tool window---> WPF User Control---> WinfromHost---> DesignerSurface)

Now we have Implemented IVsTooBoxUser interface that supports Itempicked and isSupported method.
We are able to pick that item from ToolBox and drag on ToolBox up to the Boundary. But when we enter with that item in
Editor Tool Window we are not able to drop that item at our editor tool Window. Cursur changes to No Drop state.

Above implementation is done using VS 2010 in integrated enviroment.

Please suggest any soultion to drop that picked item on the editor tool window.

Thanks in advance




Selected item of a combo box in Red background highlight and text in white color!



I got a combo box in window form. I added the items collection such as all, apple, grape, peach, banana. I would like to display the selected item in dropdownlist in Red background and white in text. Any help is much appreciated.

Highlight ListView item


Hi All.

I would like to highlight added new ListView item or item was saved after modification. 

Public Sub ListView1_SourceUpdated(ByVal CurrentItem As Integer)
 If Me.CollectionView1.Count > 0 Then
  If CurrentItem = 0 Then
   Me.ListView1.SelectedValue = Me.CollectionView1.CurrentItem("User_Id")
   Me.ListView1.SelectedValue = CurrentItem
  End If
 End If
End Sub


When I saved new or modified record the item of ListView didn't highlight. How to fix that problem?


TreeView - Popup Window


Hi there

I have got a treeview on my webpage.

All I want to do is : There shud be a pop - up window whenever I click a tree node.

 Can anyone please help me out.


Asif Ali.


keep treeview state after selecting an item from it


hi all,

i am using a treeview control in my master page to act like a menu.

it has different nodes levels e.g. root, parent and left.

when i click an item from the tree view - i am taken to the page - but the tree view goes to its orginal state of being collapsed rather than keeping its state of nodes that have been expanded.

does anyone know how i can maintain the state of the tree view in the master page?

many thanks 

Why is the "WCF Services" entry in the Add New Item window in VS 2010 missing? How to show it?


Why is the "WCF Services" entry in the Add New Item window in VS 2010 missing?  How to show it?

I've noticed that several templates are missing in the Add New Item window in VS 2010.

How can i get the WCF Services to show?


ComboBox Item highlight event



Is there a way to get an event when the dropdown item in ComboBox is highlighted?


highlighted refer to when the mouse is hovering on top of the item.

I need to know which item is currently highlighted.


Or is there a way to set a tooltip for each item in the ComboBox?




checkboxlist item renders as when the item is disabled


Hi All,

I spent about whole day today try to fix this bloody problem, this is my scenario:

I am having a checkboxlist control (dont ask me why use this control coz i am just fixing the other ppl's issue), the items in the checkboxlist are loaded from the header of a gridview, one of the items in the checkboxlist needs to be disabled, and once a button been clicked on the page, an ajax modal popup extender opens up and the checkboxlist item will appear there with one or more items need to be disabled.

Note: I do use master page and content page on my web application.

It all works as expected, but as most of you knew, this approach is not w3c validated since w3c doesn't allow this <span disabled = "disabled">, and w3c compliance is one of my requrement.

to my best knowledge, i googled and tried nearly everything i can find but still without any luck.

and this is the code in the Page_Load event and i believe might work but need to be tweaked:


            string jsName = "DisableScript";
            Type jsType = this.GetType();
            ClientScriptManager csm = Page.ClientScript;
            if (!csm.IsStartupScriptRegistered(jsType, jsName))
                StringBuilder sb = new StringBuilder();
                sb.Append("<script type=text

jQuery: Highlight Gridview Rows with Checkbox

Im learning and experimenting with jQuery and ASP.NET. Below is a simple solution I created to highlight rows in a gridview by clicking on a checkbox next to the row.

Gridview setup:

jQuery: Highlight Gridview Rows with Checkbox

Im learning and experimenting with jQuery and ASP.NET. Below is a simple solution I created to highlight rows in a gridview by clicking on a checkbox next to the row.

How to highlight datagrid or GridView row on mouse over?

This article will show how you can Ajax with GridView to display popup messages when mouse moves over certain column. In the demo project I have added first column as an image column with a help icon in it. This kind of implements a feature that if you want more information about the row you can move mouse over this icon, a asynchronous request is sent to server for data about that row and when call returns the returned message is show as a popup message.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend