wpf

How to put exe file in windows Startup

I have WPF Application. I want to give ability for user by checkbox to put App (exe file) to the windows Startup. How Can I do this programmaticaly in C#? ...

how to draw X Y Z 3D animation in WPF?

My ArrayList has X Y Z (matrix) I want to draw X y Z in WPF and have a 3D animation when drawing. How can I make a 3D environment in a WPF application? ...

WPF Unleashed error?

The book says The WPF Button class only adds two simple concepts on top of what ButtonBase already provides: being a cancel button or a default button. These two mechanisms are handy short- cuts for dialogs. If Button.IsCancel is setto true on a Button inside a dialog (that is, a Window shown via its ShowDialog meth...

Bizarre problem with WPF XAML file.

I've just started a very simple WPF application which consists of a main large image and four smaller images. In order to assist with the layout, I created some JPEGs in MsPaint containing the images -2, -1, 0, +1 and +2 and just copied them into the top level of the project directory. The XAML segment contains, for the five images: <...

Is there a simple way to specify a WPF databinding where the path is one "level" up?

This example is a admittedly a little contrived but I am doing something similar. Let's say I have the following simple classes: public class Person { public string Name { get; set; } public List<Alias> Aliases { get; set; } } public class Alias { public string AliasName { get; set; } } And let's say that I have Xaml with...

Changing the itemsSource of a treeview makes it's children invisible, when they were already displayed

I found some strange problem in WPF, using the itemsSource of a treeview. I hope I can make this specific problem clear for you. First; a story. There is a treeview. It has a list with treeviewitems as itemsSource. This list is called _roots. There is another list, called _leafs. For as in a treeview, the _roots contain the _leafs in so...

Common Programming mistakes for WPF developers to avoid?

what are the common mistake can be avoided by a WPF developer? ...

Wpf DataGrid zoom In/Out

I am using wpf data grid which has template columns. i just want to give facility of zoom in/out to users. any way to achieve this? ...

FlowDocumentReader not Routing Find Command

I have a FlowDocumentReader in my application. The containing window has registered its interest in the ApplicationCommands.Find command. When I have focus on any part of the window the Find command works correctly when executing using the Ctrl+F key combination. When I have focus on the FlowDocumentReader the command never gets routed...

Visibility="Collapsed" Doesn't work is there a need to something extra or not

hello all i want to change the position of my TextBox when the upper textbox is to be invisbile how can i achieve it i m using wpf c#. i m using Visibility="Collapsed" but it take the space . thnks in advance shashank tyagi ...

WPF DataGrid RowDataBound?

Ok this is driving me mad, I feel like a total Newbie. I'm using WPF's DataGrid control from WPF Toolkit with .NET 3.5. Link on Codeplex here I want an equivalent to the classic GridView's RowDataBound event, and I can't find any. I tried working with LoadingRow, but it fires every time I scroll. I'm trying to change the background co...

How to define 'Attached property' as 'SelectedValuePath' in ComboBox?

Hi, I have a problem with binding in ComboBox. I'd like to bind ComboBox items to ListView columns and as a selected value return value of attached property defined on the selected column. In example bellow you can see working sample that displays width of selected column. If you try to change SelectedValuePath in ComboBox into (loc:Sam...

Can i make TreeView remember its structure when raising OnPropertyChanged?

Is it possible to not reset the nodes which are open and closed when the OnPropertyChanged-event is fired and the TreeView updates is ItemsSource? If i add an object now, all nodes collapses! ...

WPF XAML properties evaluated flag

I am writing this user control, and I need to know when XAML parser has evaluated all the properties. I know that Loaded event will only get called when setters of all properties have been called. That is one way. But then I will have to manually maintain a flag indicating it. Is there any ways I can query in a setter if XAML parsing par...

How to have a dynamic theme color in WPF

In WPF I have a few resource dictionaries and in them styles for my panels and controls in my app. I'm reusing the same colors again and again. I actually have 5 colors and they give my app a good color-scheme. However if I wan't to change the theme I have to go into the RD's and change each and every color there. I would like to somew...

How to handle bitmaps in WPF?

Hi there, I need to draw a basic shapes on my bitmap (Bgra32). However, RenderTargetBitmap works with Pbgra32 bitmaps. What is the most elegant way of dealing with bitmaps in WPF? Thank you in advance for the reply! Cheers ...

Width and MaxWidth default and runtime values

In definition of FrameworkElement properties Width and MaxWidth default value is the same (double)1.0/(double)0.0 But at runtime Width has NaN, whereas MaxWidth - Infinity. What differences between properties lead to such result? ...

WPF - Handling a RoutedEvent in the parent for a specific control instance

In my user control I have several textboxes e.g. Textbox1, Textbox2. In the parent I only want to handle KeyDown events raised from Textbox1, not all Textbox I have added a handler in the parent this.AddHandler(TextBox.KeyDownEvent, new RoutedEventHandler(OnTextboxGoToPageKeyDown)); but of course this will handle all KeyDown events ...

Unit testing "hybrid" WPF/Silverlight controls

I'm starting a new WPF/Silverlight custom control project and wanted to do unit testing on this one. However I'm a little confused about how to approach this. This control would be based on the same codebase for both WPF and Silverlight with minor forking using #ifs and partial classes to tame the differences. I guess I could write unit...

CAN we Give The Space Between TWo Control In Stackpanel In WPf

hello my tittle is enough thanks and regard shashank ...