Hi, I need to display a listView inside a Treelistview. I need to Develop a Treelistview wherein each row will have its own sublist which is another listview displayed below the row.There will be an show/hide button in the first column in the main row which will control the show/hide property of the sublist. I tried Creating a datatemplate for the listviewitemtemplate and tried controlling the showhide in the datatemplate trigger but didnt fully get idea on how can be done. Can u please let me know some approach to achive this.If possible one sample on how it can be done. My list view will look like below: Column 1 || Column2 || Column3 || Column 4|| Column5 Row1 Column 1 || Column2 || Column3 || Column 4 Row1 Row2 Row3 Row2 Column 1 || Column2 || Column3 || Column 4 Row1 Row2 Row3 Can u pls Let me know on how to achieve this view. Thanks Krishnan
krishnan s
Posts
-
ListView Inside TreeListView -
ListView Scrolling with MVVMI need to scroll the listview on a button click. Iam following MVVM pattern. I tried the following but it is not working.
<local:SortableListView x:Name="headLinesGridView" IsSynchronizedWithCurrentItem="True" Style="{DynamicResource ListViewStyle}" ScrollViewer.VerticalScrollBarVisibility="Hidden" ItemsSource="{Binding Source={StaticResource TestDataSource}}" ItemContainerStyle="{StaticResource headLinesGridViewStyle}" ColumnHeaderSortedAscendingTemplate="HeaderTemplateArrowUp" ColumnHeaderSortedDescendingTemplate="HeaderTemplateArrowDown" ColumnHeaderNotSortedTemplate="HeaderTemplateTransparent"> <ListView.View> <GridView ColumnHeaderContainerStyle="{StaticResource gridViewHeaderStyle}" ColumnHeaderTemplate="{StaticResource HeaderTemplateTransparent}"> <local:SortableGridViewColumn Header="ID" DisplayMemberBinding="{Binding ID}" SortPropertyName="ID" Width="50" /> <local:SortableGridViewColumn Header="First Name" DisplayMemberBinding="{Binding FirstName}" SortPropertyName="FirstName" IsDefaultSortColumn="True"/> <local:SortableGridViewColumn Header="Last Name" DisplayMemberBinding="{Binding LastName}" SortPropertyName="LastName" /> <local:SortableGridViewColumn Header="Date of Birth" DisplayMemberBinding="{Binding DateOfBirth}" SortPropertyName="DateOfBirth" /> <local:SortableGridViewColumn Header="QueueStatus" SortPropertyName="QueueStatus" IsDefaultSortColumn="True" CellTemplate="{StaticResource IconCellTemplate}"/> </GridView> </ListView.View> <ListView.ItemsPanel> <ItemsPanelTemplate> <WrapPanel Orientation="Vertical"></WrapPanel> </ItemsPanelTemplate> </ListView.ItemsPanel> </local:SortableListView> <Button Grid.Row="1" Command="ScrollBar.LineDownCommand" CommandTarget="{Binding ElementName = Test}">Scroll Down</Button>
-
ListView Scrolling with MVVMHi , I need to acheive List View Scrolling with MVVM. As iam new to MVVM Can u please let me know how it can be acheived . Can anyone please provide a sample for the same if possible. Thanks Krish
-
Utf - 8 Querys from unicode applicationHi, I have an MFC unicode application which needs to access a database which is UTF-8 encoded. Iam accessing the database through direct query excution using ExecuteSQL function.ExecuteSQL functions expects an LPCTSTR which will be be LPCWSTR under _UNICODE , so i need to format the query as UTF-16 and pass to the ExecuteSQL right?, but the DB is UTF-8 encoded.I need to know whether this will cause any problems.? Thanks Krish
-
Difference between Custom control and UserControlHi, As far i searched it is said that UserControl cannot be templated, While the Usercontrol as a whole cannot be templated the individual controls that make the UserControl can be assigned a style right . For ex. If i have a slider control with the following: 1. 2 Repeat buttons ( for the repeat buttons) 2. One Image control ( for the track) In this case i can customize the buttons and the image control right using its styles and templates. Please correct me if iam wrong Thanks Krishnan.S
-
Difference between Custom control and UserControlHi, I need to understand the difference between the custom control and the user control . Can anyone please give me some example on the difference and when should i go for usercontrol. Thanks Krishnan.S
-
Usercontrol propertiesThanks for the reply , should i expose the width as the dependency property. One more question, if i need to modify other properties like Height, MinWidth,MinHeight then should i register those properties also as a dependency property in the user control. Thanks
-
Usercontrol propertiesHi, I developed a Usercontrol which has a slidercontrol and the textbox displaying the current slider value. I need to adjust only the slider width from the widow XAML that uses the Usercontrol . Can anyone let me know how to achieve this. Thanks
-
To maintain aspect ratioHi, I need my application to scale automatically based on the system resolution so to achieve it i have grouped my entire window to the viewbox with the stretch as "Fill" under which i have canvas and the controls are placed in the canvas. Now the i need to maintain the aspect ratio for a particular image control in the screen . Can Anyone tell me how to acheive this. Thanks
-
Dynamic Bmp loading for image control in xamlHi, I need to load the image control source at runtime using XAML, the purpose is i can change the bmp after build and that should get reflected for the image control . I knew the styles and templates can be made dynamic using DynamicResource attribute, in the same way is it possible to assign image control source dynamically in the xaml. Thanks.
-
Custom property for user controlHi, I need some helpyin developing the user control. I have developed a usercontrol for slider( which has a slider and a textbox for displaying the value ) , I need to add a user defined property orientation for my slider , based on which it should be rotated . Can anyone throw some light on how to define userdefined properties for the usercontrol. Thanks
-
How to measure cold startup timeThanks for the reply ,Actually this article talks about only the improvement points for performance. I need to know how exactly to measure the startup time as it shows different value for different trials. Thanks
-
How to measure cold startup timeHi, I have two problems which iam listing below: 1. I need to measure the exact cold start up time for WPF application. I tried measuring the startup time manually, but its showing very inconsistent value. Sometime its showing 11 sec but sometime 3 secs. Can anyone please tell me the exact reason for this inconsistency and any way i can measure the exact start up time for the WPF application . 2.Is it possible to measure the startup time module wise, like (Presentation framework loading time, PresentationCore loading time, Windows Base loading time, FontService startuptime an finally application startup time). Thanks
-
Psd file to XAMLThanks for the reply, but the link i snot working can u pls provide me the active link or if u have the exe can u pls share me.
-
Psd file to XAMLHi, I need to develop a WPF application using photoshop file. I tried importing using blend , but it creates a Image control and loads the png image for the layers, is there any better option to use the psd file for developing WPF screens. Thanks
-
[Message Deleted][Message Deleted]
-
[Message Deleted][Message Deleted]
-
Control drag and drop in GridHi, I have a grid container with controls in its cells. I need to move the controls from one cell to another in the grid or across grids by dragging and dropping. Is there any sample for it. Can anyone tell how to achieve it in wpf. Thanks
-
Conditional XAMLHi, My scenario is like this. 1. I will get the language setting from my settings file. 2. I need to display my control text based on the language setting either in English or other language. Is it possible to prepare a conditional XAML for the same scenario. For example: Can i set the content based on some setting for the Template below Thanks
-
Common Class for the windowsHi, It is possible to have a common class for two windows? i.e is it possible to have the event handling code common for both the windows as my windows are almost alike. Thanks