NotificationIcon WPF, Placeholder window, to startup a usercontrol resource,...
Hello AllI am writing an application where the mainwindow should popup (appear onto the screen) on one event, and then hide (disappear and sit in the system tray) on another event. I am developing in...
View ArticleHow to bind so that a UI element is notified that it needs to update on any...
Given a UI element is bound to and displays a particular property in a class, how can that element be informed within the XAML scripting framework that it also needs to update given changes in one or...
View ArticleDataGridCellTemplate with DataTemplate and DataTriggers in Code Behind?
Hi,I have to create Datagrid columns on the fly using code.is it possible to do the below template in Code Behind...
View ArticleWhy is DependencyPropertyDescriptor for Visibility set to readonly and...
I created a "control group" attached property that should allow me to change the properties of a group of elements in code easily. Basically I have a list of "Groups" defined by a string and adding...
View ArticleAccess violation writing location with dialog.ShowDialog()
I try to get the image path and display it with textbox,here is the code I use, but sometime it will get "Unhandled exception at 0x5bb76615 in FootballLineUp.exe: 0xC0000005: Access violation writing...
View ArticleIn Resource Dictionary, how to specify color based on defined color?
I think this is an easy question. Given I have a resource dictionary with the following:<Color x:Key="NormalBackgroundColor">#D5DAE8</Color><Color...
View ArticlePresentationFontCache hogging CPU
Hi,I am developing an XAML and C# VS.Net 2008 windows application. Startup time is fine but my system slows down from the first time the application is run. Looking at Task Manager/procexp I noticed...
View ArticleChange TextBlock Foreground color based on its Background color
In my WPF application, I have to keep on updating TextBlock background based on user conditions. TextBlock style is defined in App.xaml. If the background is too dark (Green/Blue) I want to set the...
View ArticleChange foreground color dynamically based on background color
Problem domain: In my WPF application, I change background of lot of UI controls like Button or ListItems dynamically based on data they contain. The background is changed either when the control is...
View ArticleHow to add an image at right hand side of textblock when numeric change
How to add an image at right hand side of textblock when numeric changeGridView is bind with this class, when number > 0 use up arrow image at right hand side of textblockpublic class Stock:...
View ArticlePermutations and Random
I have written a code block, for testing a set of numbers with a random functionfirstly I get a set of 6 numbers from the randomize into a list(of Integer) but test there are no duplicatesI then add...
View ArticleOnstartup method in App.xaml.cs
This is my App.xaml.cs I am getting two windows of the application; one is blank and one with desired o/p (i.e with the binding of ViewModelAdd) please tell me how to get only one start up window is...
View ArticleStyle BasedOn not quite working... Any idea why not?
Hi all,I have a style that has 2 triggers based on an IsEnabled property (1 for true & 1 for false) to enable controls (so we can be in view or edit mode). It also has a style for...
View ArticleBinding to data in an MS Access DB - WPF, C#, XAML
I am new to WPF - I have seen snippets of code here and there on databinding, datacontext, etc. as it relates to connecting to the data in an MS Access db for WPF (Visual Studio 2008), but I haven't...
View ArticleWPF multitasking along with a timer and background worker
Few days ago I started using tasks in my WPF application for parallelization purposes. My application needs to perform some work every 5 seconds. This work has to be parallelized by 4 tasks. And in...
View ArticleWPF: How to capture screen with DirectX and convert to D3DImage
What I am trying to capture screen with DirectX and display with WPF's Image (then maybe do some 2D control to 3D stuff). I already implemented capture with Win32 API which doesn't look pretty. As for...
View ArticleUI FREEZE
Im new to VS this is a .net windows application im using it as an mmorpg updater and launcher thing is it's UI freezes while downloading huge stuff i saw articles stating about DISPATCHER / BACKGROUND...
View Articlehow to compile XAML using CodeDom ?
How do I use CSharpCodeProvider to compile a XAML file into a .g.i.cs file? I want to use CSharpCodeProvider to create an EXE file from the C# code of a WPF window class.I have been reading the...
View Article[c# / WPF] How to remove items from collection view source without error ?
Hi,I have a simple database app (EF) that will show some entries in a combobox. I've created datasources from my entities, and bound the combobox to the view source collection via the ItemsSource...
View ArticleInkPresenter not releasing binding to StrokeCollectionChanged
Hi, I am experiencing an issue with a WPF InkCanvas that is data bound to a StrokeCollection staying in memory. The stroke collection is in a data model that is exposed by a view model.Using...
View Article