wpf

Exception: 'IValueConverter' type does not have a public TypeConverter class

I have just run into this exception on an IValueConverter I am implementing: IValueConverter type does not have a public TypeConverter class Has anyone else come across this? What's the cause, and how do I fix? Thanks. ...

C++/CLI : Interop window is not properly configured

Hi, I'm trying to load a WPF control in a C++/CLI application, using the HwndSource class. Here is my code : UBOOL MyWindowWrapper::Init(const HWND InParentWindowHandle) { Interop::HwndSourceParameters sourceParams( "WindowName" ); sourceParams.PositionX = 0; sourceParams.PositionY = 0; sourceParams.ParentWindow = (Int...

creating a nice GUI in WPF

Hi, I need to create a desktop CAD application which essentially should have a nice modern GUI. I am thinking of creating a WPF application so that I can have a rich user interface. Could some one suggest me a well designed desktop application GUI framework in WPF, please? I found some cool GUI in this video http://channel9.msdn.com/post...

How do you do transition effects using the Frame control in WPF?

I thought this would be easy but I guess not. I have 2 pages that load in my frame control. I want to be able to either have a nice slide effect from one page to the next or just a simple fade-In effect. Can't seem to find this anywhere on the internets. Update 1 The accepted answer is good, but I found an even better one here. http:/...

WPF For Beginners Clarification

I am a Web developer in ASP.Net. Just I heard about WPF.Is WPF is for Desktop stuff or can i use all WPF controls in my web application?. When i visit the microsoft website it talsk much about designer tools (expression,blend),where can i get web developer perspective vidoes of WPF (Just drag the control on my form and set the propertie...

WPF 3D triangle overlap problem

I'm rendering a scene with WPF 3D by making a MeshGeometry3D and adding vertices and normals to it. Everything looks good in the rendered scene (lights are there, material looks fine), but where mesh triangles overlap, the triangle closer to the camera is not necessarily rendered on top. It looks like they're being drawn in a random or...

WPF: Partial data binding in TextBlock

So here is my text block. <TextBlock Text="1 Projects / 1 Issues"></TextBlock> Using data binding I want replace 1 and 2 with {Binding Path=OpenProjects} and {Binding Path=OpenIssues}. What is the best way to do this? P.S. I am not married to TextBlock. ...

How do I get the ActualWidth of the GridViewColumn

I have the following XAML: <GridView x:Key="myGridView"> <GridViewColumn CellTemplate="{StaticResource myTemplate}" /> </GridView> <DataTemplate x:Key="myTemplate"> <ContentPresenter Content="{Binding}" /> </DateTemplate> When I use it, I want the contentpresenter to have the same width as the GridViewColumn. So far, I've ...

Access another project over an xmlns reference

I am using a custom calendar control made by someone else (under the GNU-GPL, of course) that I loaded into my solution. So how can I create a xmlns reference to it to use the calendar control? Also, they have different namespaces. ...

How do I read custom keyboard shortcut from user in WPF?

In my application, I want to let users customize keyboard shortcuts, just like it's done in Visual Studio's keyboard options. The user can focus a blank text box and then type any shortcut he wants to assign to a command. The closest I've come to make it work is by subscribing to the TextBox.PreviewKeyDown event, setting it as handled t...

WPF: Dynamically loading images from the current assembly

This is my XAML <Image Name="StatusImage" Source="/Foo.Bar.Sam;component/Images/YellowDot.png" Stretch="Fill" MaxWidth="12" MaxHeight="12"> Using VB or C#, how would I change the image to RedDot or GreenDot? ...

WPF: When do I need to call Dispatcher.BeginInvoke

I know that Dispatcher.BeginInvoke is needed whenever I'm updating the GUI on a background thread. But how do I determine at runtime if it is needed? ...

Is there an easy way to navigate a List<t> object?

I have a WPF form that shows a contact (Name, Address and State). The GUI is bound to a CurrentContact object and they are stored in a List<Contact>. I would like to add buttons to the bottom: +-----+ +-----+ +-----+ +-----+ | << | | < | | > | | >> | +-----+ +-----+ +-----+ +-----+ Meaning first, previous, next an...

Having trouble with custom panel coding -- can't figure out how to access properties of children

I'm working on a timeline that marks regions of audio signals when the user clicks the start and stop button. The user may click start and stop multiple times during a sampling session, and the time between presses should appear in the timeline as highlighted sections. The overall design is an ItemsControl whose ItemsPanelTemplate is a...

WPF: Sort a list box

How do I sort a ListBox by two fields? (In this case the ApplicationName and InstanceName properties of my model class.) ...

Can I use a trigger for changing between controls

I want to be able to "change" my listview into another control. I was thinking having the control's visibility set to hidden and when a button is clicked, change the visibility. Do I have to do this programatically? Or can I use a trigger? ...

High level global keyboard hook for C# and WPF for reading a keyboard wedge card scanner

The only keyboard hook supported for .NET managed code is a low-level keyboard hook (WH_KEYBOARD_LL). See http://stackoverflow.com/questions/1639331/using-global-keyboard-hook-whkeyboardll-in-wpf-c I have the above code working in my application at the moment so that when you swipe your card you will get a list of all the keystrokes. ...

WPF and Active Objects

I have a collection of "active objects". That is, objects that need to preiodically update themselves. In turn, these objects should be used to update a WPF-based GUI. In the past I would just have each object include it's own thread, but that only makes sense when working with a finite number of objects with well-defined life-cycles. N...

WPF: Where do I get a Threadsafe CollectionView?

When updating a collection of business objects on a background thread I get this error message: This type of CollectionView does not support changes to its SourceCollection from a thread different from the Dispatcher thread. Ok, that makes sense. But it also begs the question, what version of CollectionView does support multiple th...

WPF: How do I discard all inherited styles?

How do I tell a control or block of controls to not inherit any styles and revert back to the defaults? I need this because I have an overall theme that mostly works, but for one piece really screws up my design. ...