wpf

DocumentViewer toolbar and context menu

How to hide the default toolbar and to disallow the default context menu of the DocumentViewer control? ...

WPF versus Winforms

What are the advantages and disadvantages between using WPF (Windows Presentation Foundation) over Winforms? What are the considerations that need to be made when choosing between the two? Thanks. ...

Get FontWeight/FontStyle/TextDecorations from WPF RichTextBox

How can I detect the current text formatting at the cursor position in a WPF RichTextBox? ...

How do I evaluate dependency properties in silverlight/WPF from S.O.S. ?

Hello all. This question is fairly straightforward -- I am trying to debug a memory leak in a silverlight application using s.o.s. I was able to get some good info using !gcroot to determine what objects have open references to the one that should be getting cleared; but in these cases they tend to be core UI elements (like grid and st...

Integrate WPF and Windows Forms

I am learning WPF and was wondering if there is a way to show a WPF Window from an existing C# WinForm without 'hosting' WinForm in WPF? I tried using myWPFWindow.show() on button click event for displaying the Window. The window is getting displayed but the textboxes displayed in the window are preventing me from typing. Can someone ...

Start Storyboard within another Storyboards Timeline

Hi there. I have a storyboard(1) that does some basic animations in 2 seconds. I want the storyboard(1) to do all the property animations I have set it up to do (this all works fine). But at 3 seconds into the storyboard(1) I want to begin storyboard(2) and exit storyboard(1) without user interaction at all. Only thing I've seen that...

Is there really no way to follow up dataset parent relation in xaml binding?

Suppose I have a dataset with those two immortal tables: Employee & Order Emp -> ID, Name Ord -> Something, Anotherthing, EmpID And relation Rel: Ord (EmpID) -> Emp (ID) It works great in standard master/detail scenario (show employees, follow down the relation, show related orders), but what when I wan't to go the opposite way (s...

Setting style on first and last visible TabItem of TabControl

I want to set a style on the first and last TabItems in a TabControl, and have them updated as the visibility of the TabItems is changed. I can't see a way to do so with triggers. What we're after looks like this: | > > > | And the visibility of TabItems are determined by binding. I do have it working in code. On TabItem visibility...

A working Drag&Drop enabled ListView implementation for WPF?

Hi, Been trying to find a working implementation of a WPF listview (or listbox) where you can order items by dragging them up or down. I have found a few, but none really works, for example this one http://www.codeproject.com/KB/WPF/ListViewDragDropManager.aspx?msg=2765618#xx2765618xx stops working once you have list where you need to ...

WPF Binding My.Settings collection to Combobox items

I'm VERY new to WPF, and still trying to wrap my head around binding in XAML. I'd like to populate a combobox with the values of a string collection in my.settings. I can do it in code like this: Me.ComboBox1.ItemsSource = My.Settings.MyCollectionOfStrings ...and it works. How can I do this in my XAML? is it possible? Thanks ...

Printing a Collection in WPF

Hi, Is there any way to print in memory collection or variable size in WPF? I am using the following code in which I print the ListView control. But when the content is larger than the vertical scroll bar takes over and cuts the content. PrintDialog printDialog = new PrintDialog(); printDialog.ShowDialog(); ...

How to add XAML storyboard animation to a full blown WPF Custom Control in an XBAP?

We are creating custom WPF controls (not user controls) for an XBAP application and we would like to add a storyboard animation to scale the control to be 110% of its original size when the mouse hovers over it. We've used Blend to create the storyboard and it compiles just fine...however, when we run, it does not animate up to 110%. I...

How do I implement an address location bar (bread crumb control) similar to that in Windows Vista's File Explorer?

The explorer control in Windows Vista is very handy and I would like to be able to incorporate it in an application written in WPF. I've been unable to find a stock control that is part of the Framework. This application is being specifically developed for Windows Vista and therefore, having the same look and feel as the OS is desirable....

WPF Listbox Show Button in ItemTemplate on MouseOver

I have a listbox containing and image and a button. By default the button is hidden. I want to make the button visible whenever I hover over an item in the listbox. The XAML I am using is below. Thanks <Window.Resources> <Style TargetType="{x:Type ListBox}"> <Setter Property="ItemTemplate"> <Setter.Value>...

Media support in WPF without Windows Media Player 10+ ?

I'm wondering if it is possible to deploy Windows Media Foundation without Windows media player 10 or 11? Here's the context. I have a WPF application running in a corporate enterprise setting. WPF requires Windows Media Foundation for rich media support. Windows Media Foundation is distributed via Windows media player 10 and 11. The co...

What is the best practice for compiling Silverlight and WPF in one project?

I've just completed a Silverlight project and it's time to have a little clean up. I'd like to take my core files and put them into a separate project which I will reference from my main Silverlight app. Some of these classes are compatible with WPF and I would quite like to be able to have Silverlight / WPF code all in one project. My i...

How do you get client DPI in Partial Trust XBAP?

Is it possible to get the client's DPI in a Partial Trust XBAP? If so, how? ...

Does WPF's TextBox support spell-check dictionaries for the Netherlands?

The RichTextBox supports a spellcheck option which is very nice. (SpellCheck.IsEnabled = true) But I cannot seem to get it to another language. (I live in the Netherlands.. ;)) Does any of you have an experience with the SpellCheck option of TextBox? I know it can be change by changing the keyboard settings, but I want to change it in...

In a WPF ListView how can I prevent auto scrolling?

I have a WPF ListView which currently scrolls everytime I click on an item which is only partially visible. How can I keep the control from scrolling that item into view (instead simply selecting the partially visible one)? This behavior is very annoying when doing a drag from this control. Thanks. Added: I am looking for a solut...

How to update an XBAP's config file after deployment?

We have a WPF XBAP application that we want to change the configuration on the server after it is deployed. Since the config file is embedded in the deployment files, how is this possible? For example, we want to change the database connection strings the deployed app is connected to or we want to update the WCF service binding setting...