XamlParseException for RoutedEvent handler
I want to use an event handler for a routed event of a custom control. Unfortunately that doesn't work because Visual Studio fails to create a method with the correct signature. And it doesn't tell me...
View ArticleHow to disable KeyBinding when validation has errors
Hello.I have a form with a textbox and button. I have a validation on this textbox. If validation has errors i disable the button on the form so its not clickable. I use Multitriggers to disable the...
View ArticlePrint out PDF (from byte array) using network printer with selected settings
Hi there!I am currently working on WPF application where i want to give users option to print out document directly from app. Documents are stored in database as BLOBs and in code they appears as byte...
View ArticleContextMenu HotKeys
How to declare hotkeys for this ContextMenu?<Window.ContextMenu><ContextMenu><MenuItem Header="Add" Click="MenuItem_Click" Name="Item1"/><MenuItem Header="Delete"...
View Articlehow to connect a scroll viewer's horizontal bar value and x axis of charts...
I have a scroll viewer and it's content is a grid(lets call it scrollViewer_grid). The scrollViewer_grid has a random number of children and they are charts (the scrollViewer_grid is split with...
View ArticleDelegate subroutine calls
Hi, I have read the replies here about delegate calls across threads, but still cannot get my 'simple' code to work.I have one class that assigns a subroutine as a delegate to be passed to another...
View ArticleIn WPF When Row Virtualisation is enabled the highlighting of rows on...
I have written code on SelectedCellsChanged that highlights the rows corresponding to cells selected. When I select few cells in wpf data grid it selects corresponding rows. But When I scroll down/up,...
View ArticleWPF: how to apply application theme/style into whole WPF application?
Our application is WPF application. We use VS2013 to build our WPF application. We try to define application themes and apply to whole application. Our application includes three...
View ArticleScreen design in .NET
I'm looking to find out if it is possible to create screens in .NET 4 framework that look and function more like a web page. I have an booking applicaiton that we (the biz) want to add a front end user...
View ArticleRuntime exception thrown while using Pack URI
Trying to use Pack Uri in WPF project [dll].Designer reflects the changes that I make to color style [Red, Blue etc. for background] but during runtime, it throws an exception as below:I tried...
View ArticleUpdateLayout call making the screen black
Hi,can any body explain when updatelayout is really needed ? I checked the official api page but still not sure about this.In my wpf application one window can be opened in 2 ways 2 different buttons...
View ArticleTabControl : ItemSource as collection of UserControls..ViewModel Doesnt Bind...
Hi,I have a situation where I am forced to use TabItems as UserControls.My Problem is that...I can see the UserControls on the tabs but ViewModel is not getting Bind with the View. I can not see any...
View ArticleAdding record, updating DataTable of a Database.
All I want to do is to insert data into the dataTable of a DataGrid and it would automatically (or by pressing a button) save the data back to the original DataBase. So that when I run the application...
View ArticleCombobox Name and Surname SQL
How to show Name and Surname in Combobox? This code shows Names onlyprivate void fillCombobox() { comboBox1.SelectedIndex = 0; string querry = "Select * from Persons"; SqlCeCommand cmd = new...
View ArticleShowing a progress bar while loading List view items
Hi all, I'm new to WPF. I want to load a number of image files into a list view. For this,I have loaded the image file names into an observable collection and later assigned to the list...
View ArticleCombo box displaying name of the project
Hi Everyone, I have a combo box which i have bind the items reading from the database. now i have added the style to the combo box by doing the following;(right click combo box ->Edit Template...
View ArticleRibbonToggleButton with images for different DPI
Hi everyone!I'm trying to implement approach described in this MSDN article - http://msdn.microsoft.com/en-us/library/windows/desktop/dd316921(v=vs.85).aspx - and I want to do this for...
View ArticleZooming out on a canvas inside a viewbox
Hi,I have a canvas inside a viewbox. When I zoom out, the zoom stops as soon as the scrollbars disappear.If I increased the canvas size, then I could keep zooming out, but I don't want to do that.How...
View ArticleDragging element off left edge of canvas
When I drag an element left off a canvas, I'd like to have the canvas size expand to the left to keep the element within its bounds (so the user can then scroll left to view the element again).What is...
View ArticleSet XML data into combobox according to combobox selection
Hello,I'm developing an application in WPF for showing information about motors. The user select the motor and i'm showing to him data about the selected motor.My XML file is: <Types><Type...
View Article