Xaml Binding to empty collection
HelloI have an entity called Employee with an ObservableCollection<Address> and Address has several properties eg. Town.Now I'd like to bind directly to the Town value as in <TextBox...
View ArticleResources and ContentControl templates
When setting a contentcontrols template to xaml in code behind I cant access a static resource contained in the parent xaml.I have a contentcontrol as follows:<ContentControl...
View Articlewpf databinding in usercontrol doesn't work
Hello, When I run following code in a window the binding works normally. But when I do the same thing but make it a usercontrol it stops working. I've tried so many things but I'm very very new to WPF...
View ArticlePrinting in WPF
Hi Experts,I am creating an WPF application, in that i want to print the contents of a StackPanel. Can anybody advice me how do achieve this?-Ramesh
View ArticleChanging Virtualization on the fly
Is there a way to change virtualization on the fly and force the IItemContainerGenerator (I believe this is what it's called) to regenerate? I've got a DataGrid which by default is using...
View Articlevalidation based on values of some fields
Hi All.I would like validate if AccountNo (it include one ComboBox and three TextBoxes) and ServiceDatePicker duplicated. I mean, if database has data, for instance:AccountNo (123 4567890 5 88) and...
View Articleunable to bind images to listbox and get the selected item in wpf
I need to show a collection of images horizontally in a listbox which i could achieve. however, the challenge am facing here is that am unable to bind the selected item(image) to the listbox-selected...
View Articleusing resource dictionary as central collection of all images
Hello guys,i have a project with a lot of assemblies (> 100). many of those assemblies have subfolders like "images". many wpf-windows/user-controls for example have a "\images\close.png". that...
View ArticleFill datagrid using the data from the dataset.
Hi,I have a dataset say " UsergroupDataSet " and a datagrid say " UsergroupDataGrid ". I want to fill the UsergroupDataGrid with the data from the UsergroupDataSet on the loading event of a user...
View ArticleCan WPF Control Media Element play .wav file without installing Windows Media...
i am trying to play a .wav file inside media elementthe application is freshly deployed on windows 7 Basic 64 biti found out in that machine there is no windows media player due to which it is not...
View ArticleMemory leak on binding to a WPF TreeView
We're having an issue with a TreeView hanging onto a viewmodel set that has been bound to it. We have a static treeview on the main window, and reset its ItemsSource to Nothing or a new viewmodel when...
View Article"Unable to cast object of type 'MS.Internal.NamedObject' to type...
Hi,I have a user control and when this user control is added to a form, I get the below error."Unable to cast object of type 'MS.Internal.NamedObject' to type 'Concept.UsergroupMasterDataSet'."Below...
View ArticleFuture of Winforms and WPF,Windows
Hi,Please suggests me which one is better for future Winforms or WPF?
View ArticleIssue with DatagridHeaderText style of wpf datagrid
Hi,I am using the wpf datagrid, there are columns which are dynamically generated.I set the fontsize as :72", the data which is displayed on the grid has fonstsize 72 but, the headertext "Interest...
View ArticleWPF C# Save Controls created at runtime
Hi, I am a beginner in programming. I would like to create an array of buttons dynamically( I can do that)but then when I close the application I would like those created buttons saved and when I...
View ArticleHyperlink in a datagrid cell - No way to get the parent cell of the Hyperlink ?
Hi,I have the following template for a WPF 4.0 Datagrid cell -<DataTemplate x:Key="ReadOnlyHyperlinkTemplate"><Border Padding="3"><TextBlock Name="txt"><Hyperlink Focusable=true...
View ArticleHow do we make the TabControl expandable?
We've got a TabControl in a class we defined which inherits from HeaderedContentControl, and this is on a user control. (I hope I'm being clear about this.) When we put our user control onto a window...
View Articlebutton
how to change the button value when it is clicked? for example if we assigned a value to the button when it is clicked it will display that value on the button similarly if we want to change that...
View ArticleCombobox EntityFramework Parent-Child relationship
Hi,What i have is two comboboxes, to display my my entities. these are ReasonCategory and ReasonCode.I would like when the ReasonCategory combobox changes for the ReasonCode one to update.Entity...
View ArticleDatagridColumnHeader Drag implementation overides ColumnSorting Funcionality?
Hello guys, Im working on a project that requires me to drag a columnheader of a datagrid outside the datagrid domain and put it into a another container so i can do stuff with it later. No problems...
View Article