WPF: Routed events or regular events?
In WPF we have routed events. When should these be used instead of regular events? ...
In WPF we have routed events. When should these be used instead of regular events? ...
Q1. Which would be the best resource or tutorial to setup a simple WPF Organization Chart or Tree for an organization object (self referencing).I would like to have a button when clicked which would show an organization chart (hierarchical) tree of the various departments and sub-department.I'm looking for a base to start code + control....
I am dynamically adding an image to a canvas object which was working for a while and suddenly stopped displaying for some particular reason. Here is the code : public void shootProjectile() { var projectileImage = new Image(); var currChar = (CharactersRef.SCharacterProjectile)lstSubMenu.SelectedItem; projectileImage.Name...
Is WPF an ECMA standard library? Or it is just a part of MS .net implementation? Any references please? ...
Hi all, I have a ComboBox based on XML file data: <Root> <Node Background="Yellow" Foreground="Cyan" Image="1.ico" Property="aaaa" Value="28" /> <Node Background="SlateBlue" Foreground="Black" Image="2.ico" Property="bbbb" Value="2.5" /> <Node Background="Teal" Foreground="Green" Image="3.ico" Property="cccc" Value="4.0" /> <Node Backg...
It seems that when a WPF application starts, nothing has focus. This is really weird. Every other framework I've used does just what you'd expect: puts initial focus on the first control in the tab order. But I've confirmed that it's WPF, not just my app -- if I create a new Window, and just put a TextBox in it, and run the app, the Tex...
I am playing with wpf and when i have created database it is created with the .sdf files. I want to know details of .sdf files. How it is diffrent then the standard .mdf files and will they support linq to sql? Because i am not able to use it with linq files. ...
I need to generate an image dynamically, and after I read the tutorial here I realize i can use all the controls and layouts from WPF to generate my rendering, and then save it as a JPG. The idea is to use this instead of GDI+, which is quite primitive. The question is, how to I create a regular dll file that would generate programatic...
I have a WPF UserControl with Focusable="True". It's the only focusable control in the window. Whenever the user presses Tab or Alt (and especially when they Alt+Tab to another application), my UserControl acquires a dotted-line border, aka focus rectangle. The focus rectangle then stays there until the window is closed. How can I prev...
I have a UserControl (XAML below) that has a ListBox that I want to display images inside a WrapPanel, where images are displayed as many as will fit on one row and then wrap onto the next row etc. It works, except when the ListBox grows higher than the available space in the window, I'm not getting a vertical scrollbar, i.e. the content...
we have two textBlock like this: (we used .NET FW 3.0) <TextBlock Grid.Column="0" Name="tabName" Style="{StaticResource textBlockBarStyle}" HorizontalAlignment="Left"> <TextBlock.Margin> <Binding Converter="{StaticResource dpiConverter}"> ...
I put together http://tanguay.info/web/index.php?pg=codeExamples&id=164 which reads an XML file of customers, allows the user to edit them and saves it back, and it all works well. However, when the user clicks Save on the "manage customers" page, I want the application to "go back" to the "show customers" page. The "pages" are...
I do not know what I am doing wrong here. In the XAML below, the Border does not fill the available space on the tabItem (just lots of whitespace). How do I fill the entire tab page? <TabControl> <TabItem Header="Plant State"> <Border Background="Red" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"></Border> </...
I am trying to implement features similar to Visual Studio like code region expander/collapser for FlowDocument content. For this, I need to know, for instance, the Y coordinates of where exactly a paragraph begins and ends so that I can draw the adornments. How do I get this information? Here's what I tried: I implemented an invisible ...
Beware, this is a rather basic question (I think). I have a UserControl, called MyUserControl. I use it in a DataTemplate for my ListBox: <l:MyUserControl DataContext="Test" /> Now I want to access this DataContext in the code-behind of MyUserControl, and I expect DataContext to contain a string object with contents "Test". However, ...
I have a WPF application (.NET 3.0, VS2008) that displays data in a tab control. Custom colors are required on virtually all controls in this application : basically white foreground and green background. My problem is that when an XP theme (say Luna) is active, it is automatically applied to render controls so that my white text is wri...
WPF's ItemsControl will display a focus rectangle when it thinks it has focus and the user presses Tab or Alt. But I recently had an ItemsControl display a focus rectangle even though it did not have focus -- one of its parents did. The ItemsControl was inside a UserControl, which was inside another UserControl that did have focus. Some...
Usually, the WPF controls are declared in the .xaml files and not in the code behind (.xaml.cs files). However, sometimes I need to use some of those controls in code behind in order to manipulate them. How can I get the handle of such a control if it "resides" in the xaml file? ...
In WPF, what is the differences between CustomControls and UserControls? When should I use each? ...
I've been doing WPF applications with the MVVM pattern using Visual Studio, coding C# and XAML mostly by hand. Now I've gotten up to speed with Expression Blend so that I can click together WPF applications quickly just using the GUI, which is very nice, much more control of the layout than fiddling around with all the XAML elements 80%...