|
44 | 44 |
|
45 | 45 | The following example shows the <xref:System.Windows.Style> definition of a custom control called `NumericUpDown`. The <xref:System.Windows.Controls.TextBlock.Text%2A> property of the <xref:System.Windows.Controls.TextBlock> is bound to the `Value` of the object that is the `TemplatedParent`, which is the `NumericUpDown` control that this <xref:System.Windows.Style> is applied to in this case.
|
46 | 46 |
|
47 |
| - :::code language="xaml" source="~/snippets/csharp/System.Windows/FrameworkElement/DefaultStyleKey/themes/generic.xaml" id="Snippetrelativesource"::: |
48 |
| - |
49 |
| - For the complete sample, see [NumericUpDown Custom Control with Theme and UI Automation Support Sample](https://go.microsoft.com/fwlink/?LinkID=160025). |
| 47 | + :::code language="xaml" source="~/snippets/csharp/System.Windows/FrameworkElement/DefaultStyleKey/themes/generic.xaml" id="Snippetrelativesource"::: |
50 | 48 |
|
51 | 49 | The following returns the second <xref:System.Windows.Controls.ItemsControl> encountered on the upward path starting at the target element of the binding.
|
52 | 50 |
|
|
142 | 140 | <remarks>
|
143 | 141 | <format type="text/markdown"><. |
197 |
| - |
198 |
| - |
| 193 | +## XAML Text Usage |
| 194 | +
|
| 195 | +For XAML information, see [RelativeSource MarkupExtension](/dotnet/framework/wpf/advanced/relativesource-markupextension). |
199 | 196 |
|
200 | 197 | ## Examples
|
201 | 198 | The following returns the second <xref:System.Windows.Controls.ItemsControl> encountered on the upward path starting at the target element of the binding.
|
|
240 | 237 | <remarks>
|
241 | 238 | <format type="text/markdown"><. |
249 |
| - |
250 |
| - |
| 245 | +## XAML Text Usage |
| 246 | +
|
| 247 | +For XAML information, see [RelativeSource MarkupExtension](/dotnet/framework/wpf/advanced/relativesource-markupextension). |
251 | 248 |
|
252 | 249 | ## Examples
|
253 | 250 | The following returns the second <xref:System.Windows.Controls.ItemsControl> encountered on the upward path starting at the target element of the binding.
|
|
417 | 414 |
|
418 | 415 | <a name="xamlTextUsage_Self"></a>
|
419 | 416 | ## XAML Text Usage
|
420 |
| - For XAML information, see [RelativeSource MarkupExtension](/dotnet/framework/wpf/advanced/relativesource-markupextension). |
421 |
| - |
422 |
| - |
| 417 | + For XAML information, see [RelativeSource MarkupExtension](/dotnet/framework/wpf/advanced/relativesource-markupextension). |
423 | 418 |
|
424 | 419 | ## Examples
|
425 | 420 | The following example shows a style trigger that creates a <xref:System.Windows.Controls.ToolTip> that reports a validation error message. The value of the setter binds to the error content of the current <xref:System.Windows.Controls.TextBox> (the <xref:System.Windows.Controls.TextBox> using the style) using the <xref:System.Windows.Data.Binding.RelativeSource%2A> property. See [How to: Implement Binding Validation](/dotnet/framework/wpf/data/how-to-implement-binding-validation) for more information on this example.
|
|
600 | 595 |
|
601 | 596 | <a name="xamlTextUsage_TemplatedParent"></a>
|
602 | 597 | ## XAML Text Usage
|
603 |
| - For XAML information, see [RelativeSource MarkupExtension](/dotnet/framework/wpf/advanced/relativesource-markupextension). |
604 |
| - |
605 |
| - |
| 598 | + For XAML information, see [RelativeSource MarkupExtension](/dotnet/framework/wpf/advanced/relativesource-markupextension). |
606 | 599 |
|
607 | 600 | ## Examples
|
608 | 601 | The following example shows the <xref:System.Windows.Style> definition of a custom control called `NumericUpDown`. The <xref:System.Windows.Controls.TextBlock.Text%2A> property of the <xref:System.Windows.Controls.TextBlock> is bound to the `Value` of the object that is the `TemplatedParent`, which is the `NumericUpDown` control that this <xref:System.Windows.Style> is applied to in this case.
|
609 | 602 |
|
610 |
| - :::code language="xaml" source="~/snippets/csharp/System.Windows/FrameworkElement/DefaultStyleKey/themes/generic.xaml" id="Snippetrelativesource"::: |
611 |
| - |
612 |
| - For the complete sample, see [NumericUpDown Custom Control with Theme and UI Automation Support Sample](https://go.microsoft.com/fwlink/?LinkID=160025). |
| 603 | + :::code language="xaml" source="~/snippets/csharp/System.Windows/FrameworkElement/DefaultStyleKey/themes/generic.xaml" id="Snippetrelativesource"::: |
613 | 604 |
|
614 | 605 | ]]></format>
|
615 | 606 | </remarks>
|
|
0 commit comments