How to validate WPF checklistBox?
I have another question please, How can I check if there is no item checked in WPF CheckedListBox, my question is when there is no item checked , the message repeat several times , what I means If my...
View ArticleThreading and WPF - how does it work?
Can anyone explain or give a pointer to an explanation of the threading in C# / WPF?Especially I'd like to have a non-object oriented explanation about background worker.That is: I'd like to have an...
View ArticleWPF DataGrid Column Becoming Corrupt with Multi-Selection
All, I am updating a `StatusBar` based on the number of rows selected in a `DataGrid`. I am doing this using MVVM. The relevant XAML is as follows<DataGrid Grid.Row="1"...
View Articleloading jpg files into listbox WPF
hi all of you, I don't retrieve the jpg file stored successfully in my sql table, I have not idea why xaml side: <Image...
View ArticleStyle BasedOn suddenly stopped working.
These simple styles just stopped working out of the blue. They worked fine until today.<Style x:Key="textColumnElementStyle" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type...
View ArticleHow to move selection by up/down key press in Treeview control in WPF and use...
1. We create a HierarchicalDataTemplate for a treeview control. We can use mouse to click the tree item to change the selection. Now, we want to use keyboard up and down key to move the selection up...
View ArticleItemContainerGenerator Recycling Problem
Hi,I am trying to use Recycling within my custom virtualizing panel.Here is my code:protected override Size MeasureOverride(Size constraint) { ... // computatons of firstVisibleItemIndex...
View ArticleWPF Scrollbar on Listbox looks weird
I have a listbox that gets a vertical scrollbar due to length of content, however the track of the scrollbar has zero length, How can I have it look like a normal scrollbar, the height of which will be...
View ArticleWhich tool is best for manipulating images; WinForms or WPF?
I like using WPF, but I need to create a program in which I will be manipulating images in manner similar to that of Paint. After reading a bit about the use of images in WPF, I am wondering if...
View Articleunity, newing up a class inside a viewmodel
Hi,I've always been told that you don't inject unity into a viewmodel. Just what objects you need in a constructor etc.So lets say im in a private method.Now I need to new up an object var someclass =...
View ArticleBinding listview with dataview , narrator is not reading text in listview
Hi Team,I am looking for the solution.when we bind ListView with DataSource as Dataview then Narrator is not reading values in Listview.Narrator is reading only namespace of Dataview.Thanks in...
View ArticleSaving new Customer instance to database in CustomerViewModel
Hi,I have a CustomerView view and CustomerViewModel to add new customer to the system. It's based on Josh Smith's example, but with one extra thing. I've added new combo box which allows users to...
View ArticleWPF Apps stop responding to touches while mouse continues to work
WPF applications stop responding to the touchscreen (we are using simple button click events) after some period of time (not consistent) but WILL respond to mouse clicks and the non-WPF applications...
View ArticleFile picker control
Hi, i am developing Touch screen application. WPF file open dilog is not applicable for touch screen application.Is there any touch screen friendly file picker (file open) control available?ThanksRajesh
View ArticleAn ItemsControl is inconsistent with its items source. See the inner...
Hi, I am getting the below error when dynamically binding the data to the ListView (WPF) on scroll downAn ItemsControl is inconsistent with its items source. See the inner exception for more...
View ArticleWPF - How to make a ListView shrink to the height of the SelectedItem?
Hi All,I am wanting to make a list view behave a little like a WPF ComboBox in that when an Item is Selected the ListView will shrink to the height of 1 item and scroll so that the selected item is the...
View ArticleInterfacing Excel with Visual studio
Hello, I am a fairly new user attempting to save a string from a .xaml window to excel using visual studio 2010 and I'm having a hard time understanding the binding source methodology. I would like to...
View ArticleMake "invisible" area clickable in custom control
Greetings,I got a custom control which looks like similar to a thin line. The custom control itself should be clickabel, but it's difficult to click on the customcontrol when the Size of the control is...
View Articlecannot set name attribute value when using a container control
Hi,I created a usercontrol with a Grid.<UserControl x:Class="TestUserControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"...
View ArticleAdding Datarow to Datatable set as DataContext Giving error
I have been trying to add Datarow to empty Datatable that has one not null column through C#. Finally this DataTable will be used as DataContext for my UI.Code Snippet:string sqlStmt = "select * from...
View Article