wpf

WPF ListView Databound Drag/Drop Auto Scroll

Hi there, I've been working with Bea's solution here for a while and finding it very helpful. Problem now I'm having is when I drag-n-drop items within or to another ListView control and I want to scroll up/down "during" the drag (moving an item from index 30 to index 1), it's not happening. I would have to drag to the top of the visua...

Tray Icon animation

I know how I do to place a icon in the systray. But what the best method to perform systray icon animation? animated gifs? timers? Preferentially using C# and/or WPF. Thanks! ...

Anyone with experience of targeting Silverlight & WPF ?

Is it possible to develop against Silverlight and WPF using the same source code? Maybe using some #define blocks where it is necessary. ...

Overlay two controls

Hi, I started to make some thing in WPF and I have a question. I think the answer might be easy and even obvious, but somehow... I have two controls on a form enclosed by a grid. I want two position the second control above the first one (it's transparent). Coming from WinForms development that isn't that hard, so it won't be in WPF. B...

WPF Rounded corners - is a consistent gradient around the corner possible?

Howdy, I've made a gradient that I quite like in expression blend, and I'm trying to work out if I can make the gradient curve around a corner, to give me a rounded border effect with the gradient. The problem is that I can't use a normal border, because the gradient wont be consistent. I came up with the following which should help d...

WPF textboxes are too big!

I have a WPF page with some data entry TextBoxes on it and they look much bigger than the font needs. What determines the height of the textbox? is there a way to squish them up? The textbox gets bigger and smaller according to the font size it displays (so I don't want to set the height property directly if I can help it. Thanks ...

How to autosize and right-align GridViewColumn data in WPF?

How can I: right-align the text in the ID column make each of the columns auto size according to the text length of the cell with the longest visible data? Here is the code: <ListView Name="lstCustomers" ItemsSource="{Binding Path=Collection}"> <ListView.View> <GridView> <GridViewColumn Header="ID" DisplayMe...

How To Use DateTimePicker In WPF?

Hi Guys..I Am Having No Idea ..of Using DateTimePicker In WPF. It is Not Available in the Toolbox also. Can Any body help ? ...

Silverlight : Implementing Images

I just created a puppet in Microsoft Blend consisting of imageboxes that are displaying a dummy image(Which is a white box). In blend it shows the images but in visual studio (and when running the application) the images aren't showing. This is a snippet of the code I am using <Image Source="/Images/BodyParts/dummy.jpg" Height="10" Wid...

Scroll a WPF FlowDocumentScrollViewer from code?

Hi, I have a FlowDocumentScrollViewer I want to automatically scroll to the bottom when text is added. <FlowDocumentScrollViewer Name="Scroller"> <FlowDocument Foreground="White" Name="docDebug" FontFamily="Terminal"> <Paragraph Name="paragraphDebug"/> </FlowDocument> </FlowDocumentScrollViewer> In code I add Inlines to the Parag...

Binding WPF ComboBox to a Custom List

I have a ComboBox that doesn't seem to update the SelectedItem/SelectedValue. The ComboBox ItemsSource is bound to a property on a ViewModel class that lists a bunch of RAS phonebook entries as a CollectionView, then I've bound (at separate times) both the SelectedItem or SelectedValue to another property of the ViewModel. I have added ...

In WPF, does the order of Triggers matter?

I have the following xaml: <DockPanel> <DockPanel.Resources> <Style TargetType="Button"> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Foreground" Value="Yellow"></Setter> </Trigger> <Trigger Property="IsPressed...

How to create trapezoid tabs in WPF tab control

How to create trapezoid tabs in WPF tab control? I'd like to create non rectangular tabs that look like tabs in Google Chrome or like tabs in code editor of VS 2008. Can it be done with WPF styles or it must be drawn in code? Is there any example of code available on internet? Edit: There is lots of examples that show how to round co...

Should I navigate to a relative URI, or navigate to a new instance of a page in WPF?

Is there any difference between calling frame.Navigate and setting frame.Source = new MyPage()? Is one of them more efficient when it comes to memory usage, and is the frame's journal (back, forward buttons) affected differently when using a particular method? ...

Should we migrate to WPF or Winforms?

DUPE: http://stackoverflow.com/questions/388711/when-is-winforms-the-correct-choice-vs-wpf We have to decide these days whether or not to go with WPF as a platform for building our next generation of our product. Personally I am a little afraid of using this technology especially because of performance and because it's not mature (I am...

How can I manipulate a RagDoll made with farseer physics in Silverlight?

I made a ragdoll similar to the one in this demo. This rag doll will be used for a turn based rpg game where the physics will be used for animations such as character taking damage, dying, falling down, etc. What I am pondering at the moment is as how should go about this, should I stick the rag doll by the head to the background (leavi...

Cannot get the Exception Assistant to work

I have a C# WPF app that makes use of a number of assemblies that use native code. My problem is that most of the time, when my application throws an exception, the Exception Assistant does not come up - just the Break/Continue/... dialog. I of course have the Exception Assistant turned on in the Visual Studio options, and I have the par...

Getting the handle of window in C#

I have the following class declared: public partial class MainWindow : Window And I need to get the actual handle of the window once the window has one. How can I do that and where should I put the query function. What I tried so far was: IntPtr hwnd = new WindowInteropHelper(this).Handle; But the handle I get back is 0, which might...

How can I list colors with WPF?

How can I get list of all colors I can pick in Visual Studio Designer (which is System.Windows.Media.Colors, but that isn't a collection) and put them into my own ComboBox using WPF and XAML markup? ...

Do you have any recommendations on Blend/XAML books/tutorials for designers?

There are a lot of WPF resources that are aiming developers. We are trying to get our designer up-to speed, and I have been researching some of the options on the market. The only two reasonable options that I found were "Expression Blend Unleashed" and "APress Foundation Expression Blend 2 Building Applications in WPF and SilverLight...