wpf

Unable to bind HashSet to ListBox

Hi All, I have a requirement wherein I need to have one listbox into another. I have a table that has a lot of records, some fields being redundant. I want to have unique headers of those fields displayed, but display all other fields in that record in another list box. I want the HotelName to be displayed and then I want the Hotel blo...

Silverlight DataGrid makes the first selection when ItemsSource is Set, how can turn this off?

Hi Guys, I am using Silverlight 4 DataGrid with DataPager. When the DataGrid's ItemsSource is set, it selects the first row in the list. PagedCollectionView _list = new PagedCollectionView(myDataCollection); _dataPager.Source = _list; _dataGrid.ItemsSource = _list; The problem is that I have _dataGrid.SelectionChanged event, which ...

GridView: NumericUpDown column to update a second column

Using a gridview I a have one column with a NumericUpDown control bound to an underlying list of objects. The problem is I can bind to the valuechanged eventon the UpDown control, however when I update the percentages, it doesn't update on the screen (GridView). If in member.refreshCandidatesGrid i call grid.Rebind() it causes a mess (...

c# slimdx offscreen rendering, output to multiple windows / monitors.

Okay, I'm rewriting this post because I had a really specific question but I think it might be more useful to just explain what I want to do :) I'm working in WPF with SlimDX. The target is a program that initializes a Direct3D device, and is able to render cool D3D11 gfx to an offscreen rendertarget. Users can add output-windows, and ...

XAML/Blend dependant data binding

I want to create a listbox that'll be bound to XPath, relative to the other listbox's currently selected item. It's using XmlDataProvider for the data, and the XML file looks like this: <Programs> <Program name="..."> <Step name="..."/> <Step name="..."/> </Program> <Program name="another"> ... </Progr...

Compiling C# + WPF on Linux in order to run on Windows

I have a C# application of which some parts are written using WPF (which is not supported by Mono). Is it possible to compile this application on Linux? Ultimately, the application will run on Windows, but it is part of a larger framework and our entire build process runs on Linux, so I would like to be able to compile the C# application...

WPF: How to add 3D object from xaml file to my viewport3D?

I have viewport3D and I want to add multiple 3d objects defined in xaml files to this Viewport3D, but by default 3d object deffined in .xaml file comes already with viewport3D and I can not add it to my Viewport3D How I can use those 3D objects from .xaml files in my Viewport3D? I tryed to read xaml with XamlReader cast it to viewport3D...

c# wpf binding listbox item change

Suppose I have a listbox with a couple of items, in my case audio recording inputs. I want to show the list of available inputs - each input is an item in the listbox. The inputs should be updated realtime, so each item in the listbox has an indicator of the recorded audiolevel in realtime. How would I go about databinging my listbox to...

How do I create Windows with WPF that look like notification area windows in Windows 7?

Is there a way to create windows like the native Windows 7 notification area Windows with Windows Presentation Foundation? For example the audio controls or the power plan settings. I was able to create a Window with Windows Forms that was looking equal, but still had the resize cursor when you hovered the borders. I’m using the followi...

How do I open a new form from a wpf form and still be able to click back and forth between the forms?

I have a main wpf form that opens a new form. However when that form opens, I'm unable to click back to the original one and use that form. The original form is locked until I close the newly opened form. How do I open both forms so that the previous form can be at the very least moved around and given focus to? Within the mainForm, the...

Create a WPF text box which only responds to character key presses and few selected editing key presses

The WPF text box responds to quite a number of editing commands. I want to eliminate the vast majority and have it respond to any text input and few editing commands like backspace & delete. I know I can handle the KeyDown event but I can't see any easy way of distinguishing between character input and editing key strokes. ...

Creating several customized button template

I am just wondering if I can make several button templates in WPF then assign to a specific button the template to be used by 'declaring' the button template name (or other method you suggest) The button templates I am trying to create are: Button with black background, rounded corners, text display Button with silver background, roun...

C#/WPF: Why is TabItem.IsFocused returning null

i have code like e.CanExecute = tabEditor.IsFocused; but at runtime, i get a null reference exception error. but in the docs, IsFocused returns only true or false, why is this happening? btw, tabEditor is a <TabItem> ...

GIF animation CPU consumption problem in C#!

I have made a GIF Animation user control which loads gif animations and have created about 30 of them in my project each animating a GIF. The problem is that when I check my CPU usage it is about 70%+!!! I'm sure something is wrong with this! Please help me. Here is the code of that GIF Animator control: public class AnimatedImage : Sys...

WPF printing complex table

I need to print the complex formatted table in WPF. This is the format I need to print. Is this possible, what function I have to use? http://img833.imageshack.us/img833/6312/tableb.png ...

Can LINQ To SQL used for other database (MySQl, Oracle, etc)

I have project creating with WPF and for database O/RM using LINQ to SQL, when i finish my project some people want to use MySQL as database, so can I change my Linq to MySQL without change any source code (maybe just change the connection string) Regards ...

How to make my project runnable on any system?

I have developed a solution in Visual Studio 2008 C# WPF! I'm using a service-base SQL database (I've created and managed using Microsoft Visual Studio Sever Explorer), now I'm going to publish it but the problem is that when I install .NET Framework 4.0 and SQLEXPRESS 2005 on other systems, my application doesn't launch! :-( What compon...

WPF Socket Connections

Hi all, I really think that here ill found my answers... I try to make a server-client app in WPF, I try to use TcpClient and TcpListener.. another connection ideas will be welcome doe's someone know how to make a server-client connection in WPF?? code example can be very usefull.. hank you all... ...

A tree-like, manipulable control for manifold hierarchical data

Hi folks, I am new to C# and WPF and I need to create a diagramming control similar to MS Visio but without direct user interaction. I have tree-like hierarchical data whose nodes can be of the same type. Quite like graphs whose vertices themselves contain graphs (i.e. vertices are subgraphs). I cannot use the Graph# library for several...

Why we need WPF in .net?

Why we need wpf what its benifit, and what is its flexibility? ...