Top "Wpf" questions

Windows Presentation Foundation, or WPF, is a subsystem for rendering user interfaces in Windows-based applications.

How do I space out the child elements of a StackPanel?

Given a StackPanel: <StackPanel> <TextBox Height="30">Apple</TextBox> <TextBox Height="80">Banana</…

wpf silverlight xaml stackpanel
WPF C# button style

Would somebody know how to recreate this button style in WPF? As I do not know how to make the …

wpf xaml styles
Binding a Button's visibility to a bool value in ViewModel

How do I bind the visibility of a button to a bool value in my ViewModel? <Button Height="50" Width="50" …

c# wpf xaml data-binding
Wpf DataGrid Add new row

I have managed to get DataGrid to show new row for adding new item. Problem i face now is i …

c# wpf mvvm datagrid
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 …

wpf xaml listview gridview gridviewcolumn
How to bind DataTable to Datagrid

I have a problem binding a DataTable to a DataGrid. I have already searched for solutions but just can't get …

c# wpf datagrid datatable
Binding objects defined in code-behind

I have some object that is instantiated in code behind, for instance, the XAML is called window.xaml and within …

c# .net wpf binding
How to automatically select all text on focus in WPF TextBox?

If I call SelectAll from a GotFocus event handler, it doesn't work with the mouse - the selection disappears as …

.net wpf silverlight textbox
WPF Binding StringFormat Short Date String

I would like to use Short Date named string format in WPF. I tried something like: <TextBlock Text="{Binding …

wpf xaml binding
convert from Color to brush

How do I convert a Color to a Brush in C#?

c# wpf