Questions tagged [wpf-4.0]

Version 4.0 of the Windows Presentation Foundation (WPF).

New and enhanced features in WPF 4:

  • New Controls
  • Visual State Manager
  • Touch and Manipulation
  • Graphics and Animations
  • Text Binding
  • XAML Browser Applications
  • WPF and Windows
  • WPF and Silverlight Designer
423 questions
7
votes
3 answers

Animating a TextBox.Foreground in WPF

Is there anyway to animate a TextBox.ForegroundProperty? #FF666666 #FF666666
amiry jd
  • 27,021
  • 30
  • 116
  • 215
7
votes
1 answer

Allow users to resize Expander in WPF

I have a lot of C# and WinForms experience but am a newbie to WPF. I have a Window with an Expander which expands downward. Much like the question box I'm currently typing in, I'd like users to be able to dynamically resize the Expander by…
Walter Williams
  • 944
  • 3
  • 11
  • 25
6
votes
2 answers

Coerce a WPF TextBox not working anymore in .NET 4.0

In my WPF application I have a TextBox where the user can enter a percentage (as int, between 1 and 100). The Text property is databound to a property in a ViewModel, where I coerce the value to be in the given range in the setter. However, in .NET…
Daniel Rose
  • 17,233
  • 9
  • 65
  • 88
6
votes
3 answers

WPF animating a StackPanel's width from 0 to Auto?

I am trying to animate a StackPanel when its visibility changed to grow from a width of 0 to its automatic width, here is what I have at the moment:
Alex Hope O'Connor
  • 9,354
  • 22
  • 69
  • 112
6
votes
2 answers

WPF 4: What happened to DataGridColumnHeader?

What happened to DataGridColumnHeader? It looks like it was dropped when the DataGrid was moved into PresentationFramework.
Jonathan Allen
  • 68,373
  • 70
  • 259
  • 447
6
votes
2 answers

How to fill treeview in WPF dynamically

Treeview code on xaml
Chhatrapati Sharma
  • 605
  • 4
  • 9
  • 18
6
votes
4 answers

TextBox readonly "on/off" between "double click and lost focus events" in wpf

I have a control like below xaml with Read only enabled. Now when i…
shahul hameed
  • 151
  • 2
  • 16
6
votes
1 answer

how to set the X:Name property through C# in wpf datagrid column

In WPF Datagrid, i am adding Column dynamically for that i want to set X:Name property of DataGrid column by C# My Code: DataGridTextColumn clm = new DataGridTextColumn(); clm.Header = "Marks"; clm.Width =…
Avinash Singh
  • 2,697
  • 11
  • 44
  • 72
6
votes
3 answers

Checkbox with DataGrid WPF

I am trying to create a DataGrid in WPF 4.0 using MVVM... Features required - Muti - Select rows using a checkbox (single click) A select all checkbox to check all the checkboxes in the datagrid Something like this - It has been 2 days and i am…
Rajat Suneja
  • 494
  • 2
  • 10
  • 27
6
votes
1 answer

Consolidating common WPF Styles

I have various Style elements in my WPF XAML that are the same except for the data binding property, e.g.: