wpf

disable mouse wheel on itemscontrol in wpf

I have a usercontrol that has a scrollviewer, then a bunch of child controls like text boxes, radio buttons, and listboxes, etc inside of it. I can use the mouse wheel to scroll the parent scrollviewer until my mouse lands inside a listbox then, the mouse wheel events start going to the listbox. is there any way to have the listbox sen...

VS2008 XAML Designer exception "Key cannot be null" when using default styles from a ResourceDictionary

I'm using a shared ResourceDictionary to define default styles and having major conflicts with the XAML Designer in Visual Studio 2008. Key cannot be null appears for all attempts to show the XAML design view. The dictionary is merged into App.xaml (to be used by all windows) and has a number of styles setting the defaults for controls...

WPF WebBrowser Mouse Events not working as expected

I have a WebBrowser object in a WPF Page and I'm trying to do something whenever the user interacts with the page. I have intially tried to use the events associated with the WebBrowser object but they don't seem to be firing. Below is a simplified example of what my code is trying to do: webBrowser.MouseDown += new MouseButtonEventHand...

WPF Datagrid binding custom column headers.

I am trying to figure out how to bind a WPF DataGrid's column header and main data to a data source using an MVVM pattern. The result I'm looking for would look like this: I've successfully styled the headers here, but I'm unsure how to bind the values in the headers. Specifically, the IsChecked property of the check-box, the selected...

which tools to use for designing cooliris type applications?

Hi.. I want to utilise the 3dwall feature of cooliris, the physics effects of the icons in bumtop to design an application for making the image viewing more intuitive and interactive. I dont want to use flash as it would slow down the speed for interaction on desktop. PLease could someone tell me about choice of 1.) physics engine - ph...

How to make a WPF ComboBox editable with custom values

I would like to have a combobox that allows selection from a list of values and also allow a custom value from the typed in text. For display reasons the items are a complex type (lets say the combobox item template displays a patch of color and a flag indicating if it is a custom color). public class ColorLevel { public decimal Int...

Bird's eye data visualisation in WPF and web client automation

This is a complex problem and it deserves a long explanation. Let's say that I have a picture of a high level workflow/sitemap of a web site: http://home.everestkc.net/radoslav/Question/High_Level_Workflow.png Basically there is a main flow and some alternative paths with various number of pages/images in each case. In essence I want ...

WPF geometry (Path) partly filled shapes

The idea is to get rating control, that could have value like 0.3 and draw it as partly filled shape. The approach I used was described in CodeProject article. Have Path, add mask (rectangle), add outline. Original code used Margin for mask and fixed-width paths. The problem is that using rectangle as mask re-draws background, which is g...

Databind InkCanvas Children

In a WPF application I have an ObservableCollection of objects (areas on an image) that I want to display and edit (size and position) at runtime. I would like to use an InkCanvas in Select mode with Rectangles representing my objects, but it doesn't seem to directly support data binding. Is it possible to somehow bind the Children co...

Fire a template child event in current context?

Hello. Is there a way to fire an event from a visual within a DataTemplate in the current context (i.e. Page, Window, UserControl etc.). For example I have a DataTemplate that contains a button or a ListBox. I want that when the button is clicked or when ListBox.SelectionChanged is fired in the ListBox, the event handler should be decl...

WPF DataTemplate for ListBoxItem selection

I have added a datatemplate to a listbox class to bind my collection to. <ListBox x:Name="lstEmails" Height="259" Margin="12,0,12,41" Width="276" SelectionChanged="lstEmails_SelectionChanged"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <Labe...

Window.Location???

Is there a way to manually set a WPF Window's location like in Windows-Forms? ...

What's the point of XPS?

When I read books about WPF, I saw the authors mention XPS like it was something important. Windows also includes its XPS viewer, and I've seen that listed as a "feature" of Windows. But why? What's the point? Who the heck uses it? It's my understanding that XPS is, basically, like PDF, xhtml, or ePub (which is just xhtml)...or even Wor...

WPF TabControl Position Tabs in the top right corner

I have a WPF TabControl that I want to position the tabs with a TabStripPlacement of Top, but I want them to display with a right orientation on top. I've achieved that easily by doing a FlowDirection of RightToLeft; however, I don't want the children controls to inherit the RightToLeft FlowDirection. Is there any way to position the ta...

How do I handle Canvas.Top change event in WPF?

Hi I have an element positioned on Canvas using attached properties Canvas.Top and Canvas.Left. Then using animations the element is moved to different set of coordinates, like this: DoubleAnimation left = new DoubleAnimation( oldLeft, newLeft ); DoubleAnimation top = new DoubleAnimation( oldTop, newTop ); element.BeginAnimation( Canv...

WPF ListBox of Button's: how to change selected item on click with XAML

I have a templated listbox: <ListBox Grid.Row="0" Grid.Column="1" Background="Transparent" BorderThickness="0" x:Name="mainMenu" ItemsSource="{Binding Source={x:Static local:MenuConfig.MainMenu}, Mode=OneTime}" IsSynchronizedWithCurrentItem="True"> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem"> <EventSetter ...

How do I prerender the controls on a TabItem in WPF?

C# XBap Application I have a TabControl with four TabItems in it. Two of these TabItems simply contain a DataGrid from the WPFToolkit which pulls a fairly small datatable (100 rows by 4 columns) from a SQL Server database. My problem is that when I load my application and I click on one of the TabItems containing a datagrid. There se...

Can I get a rundown of what happens during the Window Loading/Initialization in WPF?

I'm trying to understand how it all comes together, but there's a lot of methods and classes involved and trying to understand how it goes I just end up getting lost. ...

WPF XAML Properties Description

Is there anyway to show a small description in XAML view for the public properties? ...

WPF combobox binding from code behind

Hi, How to bind a iList item to a combobox through codebehind.cs file. plz explain with simple steps. i need the steps for two way binding. not by setting itemssource. yes, some thing like "myComboBox.SetBinding( ItemsControl.ItemsSourceProperty, new Binding { Source = myList });" but i need selected item also Thanks, ...