Top "Wpf-controls" questions

WPF controls include UserControls, which are composite collections of other controls, and CustomControls, which are controls built with WPF styles and templates.

How do I modify ONLY the right (or left, top, bottom) value of a WPF control's Margin property?

This is quite easy to do from code-behind: var button = new Button(); var margin = button.Margin; margin.Right = 10; button.Margin = …

wpf xaml mvvm wpf-controls mvvm-light
What is the difference between HorizontalAlignment and HorizontalContentAlignment in WPF?

What is the difference between: HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" in a textbox in WPF? Sample example: <TextBox HorizontalAlignment="Stretch" …

wpf wpf-controls
Get object by its Uid in WPF

I have an control in WPF which has an unique Uid. How can I retrive the object by its Uid?

wpf object wpf-controls fetch
Visible line count of a TextBlock

If you set TextWrapping to "Wrap", a WPF TextBlock can have several lines of text. Is there a "clean" way …

wpf wpf-controls textblock
how to make Textbox text as Hyperlink in WPF

I want to make textbox text as Hyperlink. Suppose if the type www.google.com as tetxbox text,when i …

xaml wpf-controls wpf-4.0
WPF treeview item background over entire row

i am writing one app and i need to set background under entire row by items. I found some inspiration …

c# wpf treeview wpf-controls treeviewitem
WebBrowser control keyboard and focus behavior

Apparently, there are some serious keyboard and focus issues with WPF WebBrowser control. I've put together a trivial WPF app, …

wpf keyboard wpf-controls focus webbrowser-control
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 …

.net wpf xaml wpf-controls wpf-4.0
WPF DataGridTextColumn Tooltip

Is there a way to add tool tip to DataGridColumn header and still retain the sorting functionality. The below code …

wpf wpf-controls wpfdatagrid datagridcolumn
How do I host WPF content in MFC Applications?

I'm going to answer my own question here because I spent a few hours piecing this together and wanted to …

wpf mfc wpf-controls