wpf

How to catch event when an item in a BreadcrumbBar is clicked?

I'm testing BreadcrumbBar from Vista Bridge Library. My very simple demo project is here (using latest version 1.4 at the moment). As we know, when clicking an item (on itself, not on the small breadcrumb on its tail), all the items on the right will disappear. I want to pop up a message box when that happens. How can I do it? ...

How to assign dynamic value to an xml attribute in a resource tag?

I have a very simple demo project in here. In my code I need an xml resource. In the xml resource I need to set the attribute value to be a dynamic value such as read from configuration file ect... I tried binding but it seems like all text binding syntax are passed to the attribute. So, how can we bind/or work-around to have value set ...

Is the “VistaBridge” compatible with Windows XP?

Hi everyone, I'm wondering if VistaBridge is compatible with Windows XP? I'm running Windows 7 so I can't test it. Have you tried it on Windowx XP? Please let me know. Nam. ...

Scalable WPF and Forms combined in one app.

Hi, I'm developing an app that is a mix of WPF and Forms. Some Forms are hosted in wpf host some in form host . What I want to do is to make my app scalable on resize. When user expand the form it should stay in the center when windows gets smaller it should scale with it. I did something like this protected override void OnResize(E...

Should I use the WPF or SlimDX?

Here's what I want to do: I want to draw geometric primitives and maybe some form of 3D graphs and charts. I also want to be able to freely move the camera around. I want to do all this in a WPF or Windows Forms Window or maybe even render to an image. And finally, I want to be able to achieve this in a fairly straightforward manner. So,...

Get the correct treeview Item from WPF PreviewMouseRightButtonDown event of the TreeView Item

I have a WPF treeview with dynamic levels (TreeView Item uses a Hierachical data template which has a bindable richtextbox) for my application I need to handle TreeViewItem's PreviewMouseRightButtonDown event. When I right click on a treenode based on the node's level this event gets hit multiple times (equal to the treeview item's le...

save bindings to XAML

According to Microsoft, http://msdn.microsoft.com/en-us/library/ms754193.aspx#Extension_References_are_Dereferenced bindings are not serialized to XAML when using XamlWriter. Has anyone implemented a way to save these bindings to XAML? ...

WPF - Drawing image to canvas and erasing and redrawing repeatedly

I currently have a canvas with an image background in a WPF application. Above this canvas, I have a slider control. I need to, as users slide the value of the slider back and forth, draw a red line straight down across the canvas. I need to do this every time the slider value is changed such that the red line is always aligned with t...

wpf datagridview combobox colmun ItemsSource binding problem

Hi, I cant seem to bind the datagridview's comboBoxColumn's ItemsSource Property the way I want. My Class hierachy used for this application is like this, I have a class called "PrescriptionViewModel" Inside it I have set the userControls (the view) data context to an object of "PrescriptionPresenter". Inside the "PrescriptionPresente...

determine a textbox's previous value in its lost focused event? WPF

Hi, I have a textbox and have an onlostfocus event on it. Inside the lostfocus method, is there a way I can determine if the user has actually changed the value in it? i.e how do i get hold of any previous value in it? Thanks ...

Are recursive DataTemplates possible?

I have a class something like: public class Section { private IEnumerable<Section> sections; private IEnumerable<KeyValuePair<string, string>> attributes public string Name {get;set;} public IEnumerable<Section> Sections { get {return sections;} } public IEnumerable<KeyValuePair<string, string>> Attr...

I need a WPF ComboBox control that uses a most recently used list of items

I need a WPF ComboBox control that uses a most recently used list of items. I want to store file paths the user enters in one combobox. In another combobox I want to store any text the user entered. The combobox should allow me to keep track and store of the last twenty items or so ...

Cannot find a public type named PresentationUIStyleResources

I am new to WPF and XAML, but after a few hours of googling I cannot figure out what is wrong here. I have PresentationUI assembly added as a reference. "The type reference cannot find a public type named 'PresentationUIStyleResources'. Line 14 Position 44." The error occurs on the first line with 'PresentationUIStyleResources'. What...

Template of root control

Hi! I have custom control named Frame (public class Frame : ContentControl, IDisposable). Frame in constructor defines DefaultStyleKey = typeof(Frame); and Frame template is in Generic.xaml resource. Now In some other project I use frame that is in Silverlight.Controls and if I set my main page that the root element is frame like this <...

WPF MVVM - query about designing Models based on XSD

hi there, I have a small WPF application based on MVVM priniciples. So far I had dummy Model classes created in my app. Now I plan to call a Web Service that uses XSD. Looking forward I would like to use these Xsd Types as Models. I can see atleast two way of doing this (could be more); for eg - add a reference to the Web Service. T...

ToggleButton binding

Hi, If i have a Collection bound to n togglebuttons in a stackpanel in a usercontrol....how can I update the underlying Collection with no code behind (including Checked and unchecked events) and complete update logic? Thanks, U. ...

WPF C# undo redo

I have to do UNDO REDO implementation in WPF for NumericEditors like textbox. I am using infragistics xamNumericEditor control. How can I start? Which method is best to follow. I have searched net. Found that memento and command patterns are there. Which one is best? ...

Cannot convert string 'Top' in attribute 'VerticalAllignment'

I am getting following error randomly. cannot convert string 'Top' in attribute 'VerticalAlignment' to object of type 'System.Windows.VerticalAlignment'. Top is not a valid value for VerticalAlignment. Please suggest what could be causing this error to come up and why it is so random. <ProgressBar Margin="10" Name="PBar" H...

WPF Enterprise Library 5 Validation

I've just started to follow the EntLib hands on labs for the validation integration with WPF. http://www.microsoft.com/downloads/details.aspx?FamilyID=4f8cd377-5522-4f45-a024-44a6ca5111ec&amp;displaylang=en What I have found is that my textbox's databinding is firing fine when my validators pass. I have a string property with the follo...

WPF layout for complex card game

As my first WPF project, I am attempting to build an application to play a card game similar to Magic the Gathering. It is not clear to me how to lay out the main play area. You can see some examples that are similar to what I am attempting by looking at example 1 or example 2. The chat/info areas on the right would be separate user c...