Simple (I think) Horizontal Line in WPF?
How about add this to your xaml: <Separator/>
How about add this to your xaml: <Separator/>
Check out the pack URI syntax. You want something like this: <ResourceDictionary Source=”pack://application:,,,/YourAssembly;component/Subfolder/YourResourceFile.xaml”/>
<TextBlock Text=”Stuff on line1
Stuff on line 2″/> You can use any hexadecimally encoded value to represent a literal. In this case, I used the line feed (char 10). If you want to do “classic” vbCrLf, then you can use 
 By the way, note the syntax: It’s the ampersand, a pound, the letter x, then … Read more
I found another solution here, since I ran into both post… This is from the Myles answer: <ListBox.ItemContainerStyle> <Style TargetType=”ListBoxItem”> <Setter Property=”HorizontalContentAlignment” Value=”Stretch”></Setter> </Style> </ListBox.ItemContainerStyle> This worked for me.
Add a preview text input event. Like so: <TextBox PreviewTextInput=”PreviewTextInput” />. Then inside that set the e.Handled if the text isn’t allowed. e.Handled = !IsTextAllowed(e.Text); I use a simple regex in IsTextAllowed method to see if I should allow what they’ve typed. In my case I only want to allow numbers, dots and dashes. private … Read more
Their names can be a bit confusing :). Here’s a summary: The SelectedItem property returns the entire object that your list is bound to. So say you’ve bound a list to a collection of Category objects (with each Category object having Name and ID properties). eg. ObservableCollection<Category>. The SelectedItem property will return you the currently … Read more
It sounds like you want a StackPanel where the final element uses up all the remaining space. But why not use a DockPanel? Decorate the other elements in the DockPanel with DockPanel.Dock=”Top”, and then your help control can fill the remaining space. XAML: <DockPanel Width=”200″ Height=”200″ Background=”PowderBlue”> <TextBlock DockPanel.Dock=”Top”>Something</TextBlock> <TextBlock DockPanel.Dock=”Top”>Something else</TextBlock> <DockPanel HorizontalAlignment=”Stretch” VerticalAlignment=”Stretch” … Read more
A StaticResource will be resolved and assigned to the property during the loading of the XAML which occurs before the application is actually run. It will only be assigned once and any changes to resource dictionary ignored. A DynamicResource assigns an Expression object to the property during loading but does not actually lookup the resource … Read more
If you want to bind to another property on the object: {Binding Path=PathToProperty, RelativeSource={RelativeSource Self}} If you want to get a property on an ancestor: {Binding Path=PathToProperty, RelativeSource={RelativeSource AncestorType={x:Type typeOfAncestor}}} If you want to get a property on the templated parent (so you can do 2 way bindings in a ControlTemplate) {Binding Path=PathToProperty, RelativeSource={RelativeSource TemplatedParent}} … Read more
There really is only one name in XAML, the x:Name. A framework, such as WPF, can optionally map one of its properties to XAML’s x:Name by using the RuntimeNamePropertyAttribute on the class that designates one of the classes properties as mapping to the x:Name attribute of XAML. The reason this was done was to allow … Read more