wpf

InkAnalyzer throws FileNotFoundException on Vista deployment

I have a WPF C# application that makes use of the InkAnalyzer class. On my development platform (Windows XP), I have added references to IACore.dll and IAWinFx.dll for the project before building the release. However, when I tried to run this on a HP TouchSmart tablet PC (on Windows Vista), the application throws a "FileNotFoundExceptio...

WPF Events and references to object, how to mangae them.

I have a small WPF application, which has a Canvas and a Grid. I placed some custom user controls on the Grid. Now I like to capture some mouse events on them. As a consequence of one event I would like to add (or modify) something to the canvas. However in the user control, you don't have a reference to the underlying canvas. First ques...

WPF / WCF Push Notification

Does .NET 3.5 (WCF, or other) offer any type of push notification service? ME: I have a server and a client. I want a service to run on the server and if x happens then push a notification to the client. I don't want to pull the server every x minutes to gather the information. – Jeremy H (23 hours ago) Kent: Yep, look at WCF callbac...

WPF: TreeView inside a ComboBox

I'm trying to put a TreeView inside a ComboBox in WPF so that when the combo box is dropped, instead of a flat list the user gets a hierarchical list and whatever node they select becomes the selected value of the ComboBox. I've searched quite a bit for how to accomplish this but the best I could find was only peices of potential soltui...

WPF data binding and type conversion

I have a question regarding WPF binding and converting the data types seen by the UI objects in XAML. I have a user control that I would like to reuse in different applications. The user control displays a thumbnail image and several TextBlocks to display person demographic information such as name and address. The user control is used...

WPF Treeview with fixed width columns

I want to create a mix of a treeview and a listview. I want to have 2 columns. In the left column i want a recursive treeview and the right column should show some info about the items from the left column. Let's call the left column Name and the right column Value. The problem is that when you expand a treeview the indentation level cha...

Floating child window in WPF

Hi, I want to create floating child window in .NET 3.0 WPF application. What I'm doing is: sideWindow = new SideWindow(this); sideWindow.Left = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - sideWindow.Width; sideWindow.Top = 125; sideWindow.WindowStartupLocation = WindowStartupLocation.Manual; sideWindow.Owner = this; sid...

WPF: Slider with an event that triggers after a user drags

I am currently making an MP3 player in WPF, and I want to make a slider that will allow the user to seek to a particular position in an MP3 by sliding the slider to the left or right. I have tried using the ValueChanged event but that triggers every time it's value is changed, so if you drag it across, the event will fire multiple times...

WPF: Why is DataContextChanged not raised on a logical child?

Hi, I have a problem with DataContextChanged not being raised on a logical child of my custom Panel control. I've narrowed it down to this: Starting from a wizard-generated WPF application I add: private void Window_Loaded( object sender, RoutedEventArgs e ) { var elt = new FrameworkElement(); this.AddLogicalChild( elt ); D...

Invariant stroke thickness of Path regardless of the scale

Hello! We are using wpf to develop a cad like application where drawings placed on the canvas using the Path object. I just ran into a slight issue that whenver i scale/zoom my canvas, all the elements in the canvas get scaled and this is the behaviour i wanted but this also increases the stroke thickness of the Path. Is there a way by...

Anyone know the algorithm used to size Grid columns with spanning cells? (WPF)

Using the WPF Grid control is easy when your child elements are always contained within a single grid cell (i.e. there is no column/row spanning). A fixed width column stays the requested fixed width, an auto column will indeed size itself to be as wide as the widest cell in the column. Star columns share any remainder space according to...

WPF control for viewing Office Documents

Hi, I am looking for a way to view Microsoft Office and PDF documents within a WPF application. Does anyone know about an Office viewer control that works well in WPF? Thanks Jay ...

Underlining the WPF datagrid headers

Hi all, I have very silly question to ask you.. :P how can I underline the DataGrid headers ?? ...

WPF Data Binding to a string property

Hi, I have a question about data binding which I am struggling with. I have the following property in my xaml.cs file: private string _stationIdInstruction; public event PropertyChangedEventHandler PropertyChanged; public string StationIdInstruction { get { return _stationIdInstruction; } set { ...

WPF FileDrop Event: just allow a specific file extension

Hi there, I have a WPF Control and I want to drop a specific file from my desktop to this control. This is not a heavy part but I would like to check the file extension to allow or disallow the dropping. What is the best way to solve this problem? Thanks! ...

dynamically nest DataTemplates in ListView

I have an object of Type MyTypeOneViewModel that is displayed in the first column of ListView and I have an object of Type MyTypeTwoViewModel that is displayed in the 2nd column of my ListView. Both types have a property of type MyNestedViewModel. Now I would like to display a different DataTemplate for each cell in the ListView dependin...

MVVM Questions: ViewModel/View relationship and validation

In our WPF application we want to use the basic MVVM pattern. We were discussing it and some uncertainties about ViewModel/View relationship and validation came up. Would you say the following is a good understanding of it? Every View has one and only one ViewModel and the ViewModel's purpose is to provide its View with data and handl...

Focus on a Textbox in DataTemplate selected by TemplateSelector

I've got a ListView that displays different kinds of items. One of those has a textbox I want to set the focus to. I use a DataTemplateSelector to select the DataTemplate for each item. This question explains how to set the focus on a textbox in a DataTemplate. But, in this case the DataTemplate is definded directly on the ListView. In...

WPF: Custom +- in TreeView

Hi all, It's possible to change the built-in collapse-expand icons of TreeView control (+-) to my own icons? Thanks in advance! ...

Showing Header of Tab using Prism

I'm using Prism and have a region that is a TabControl. I have a DataTemplate on the TabControl.ItemTemplate set to an interface of type IView. IView has a Title and Description string. When I call RegisterViewWithRegion with my IView, the tab is added but no description is shown on the header. Can I not bind to properties on an interfac...