Custom Control - Best place for visual-tree generation?
I'm building a custom control (extending Canvas) which should present a chartflow diagram (nodes and connectors). It will be feeded through databinding and a dependency property (ItemSource). The...
View ArticleWhy in MVVM, we shouldn't use the partial class of the View as the View-Model?
Maybe it's a very naive question. But I cannot imagine at this moment in time the reason why we should not use the partial class of the View as the VM. It could be because I haven't yet face a...
View ArticleBlack window remains open even after closing the window programatically
I have an application which has multiple windows. From mainwindow button click event I am closing the child form of the application. The child window is opened after a successful socket, serial or...
View ArticleTexbox handle convert problem
Hi,I'm trying to create a validate form but when i put no int value in textbox bind on int i get the ardorner with the error about fail conversion.But i can valid a form.In my little app, just put...
View Articlecreating generic user control
I have a generic structure called POSet<T> which I would like to create some user controls e.g. POSetGraph<T> : UserControl. How do I do this?
View ArticleIt's time for the TechNet Wiki WPF "Great Guru Love-in"! You too can get some...
February at TechNet Wiki usually involves a lot of love... We love to read.We love to learn.We love our gurus, for they love to give. We love to make friends and promote great content.We love to meet...
View ArticleJust in case any one needs a Observable Collection that deals with large data...
the VirtualizingObservableCollection does the following: Implements the same interfaces and methods as ObservableCollection<T> so you can use it anywhere you’d use an...
View ArticleHow to check if xps document is blank or has values in c# WPF
Can anyone suggest me the solution for this?I check it using FileSize but it did not work.Thanks,
View ArticleNumericUpDown control in wpf
Cound find NumericUpDown control in WPF. Is there any dll needs to be added?
View ArticleRenaming the binding and the property?: C#
How can I rename a property: eg, private string _Material; public string Material { get { return _Material; } set { _Material = value; NotifyPropertyChanged(); } }And it would rename its binding in...
View ArticleChange Row and Add new row on Datagrid using MVVM
Below is my Xaml and ViewModel class looks like. I try to change the existing row or add new row but both of them doesnt work. When I click empty row, it looses the focus. how I can achieve it directly...
View ArticleWhy does this raise a Parse exception in XAML?
I suppose I am a beginner in C#, and I'm decently familiar with creating basic Windows forms projects. However, when it comes to XAML and using WPF, I'm just a tick above clueless. In the Form...
View ArticleGet selected Listbox item
hi,Can someone tell me how to know which listboxitem from a listbox was selected by the user?This is the listboxitem.<ListBoxItem HorizontalAlignment="Left" Name="Canvas" Foreground="White"...
View ArticleWpf background for button disappeared on mouseover - cannot override the style
I have a button in wpf with a background image I try to override the style to avoid picture disapeared onmouseover.i try to do this here:<Window x:Class="WPFTEst.MainWindow"...
View ArticleHow to set the background in a listview?
I would like to set the background of the ítems in a listview to transparent because I will set the background with a converter.I am doing this with datagrids and works, and the way tha I am using...
View ArticleWhy does not return the correct color?
I have a resources dictionary with a color:<SolidColorBrush x:Key="MyColorWhenSelected" Color="{Binding Source={x:Static SystemColors.HighlightBrush}}"/>I have added this resources to...
View ArticleFull Customize AvalonDock
HelloI try to customize AvalonDock in my WPF application. I have some problem and I need your help and possible sample code.1- I would like to add content (with command), for example "Import", "Save"...
View ArticleIsModified (IsDirty) flag management
Hello, My question is about IsModified (IsDirty) flag management technique. I have a SDI application, and I wish to implement modification detection as good as possible. I'm sure WPF offer all what I...
View ArticleUPDATE single ROW from DATAGRID without refreshing the entire ItemsSource
Hello there, I have a simple datagrid that has an ItemsSource of ObjectQuery<DbDataRecord>. Let's say I want to refresh a single row from the datagrid, (Because a specific item i know has...
View ArticleHow to: subscribe for the viewer's Error event
I am running a third party report tool and am trying to understand how to comply with their request. My report works fine in all export modes with the exception of export to word at which time it...
View Article