mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-09 16:06:09 +02:00
Links: .NET Desktop - framework\wpf (#109)
* Links: .NET Desktop - framework\wpf * Apply suggestions from code review Co-authored-by: Andy De George <[email protected]>
This commit is contained in:
co-authored by
Andy De George
parent
c1d6e1d23e
commit
674b773578
+4
-2
@@ -10,7 +10,9 @@ helpviewer_keywords:
|
||||
ms.assetid: 52682194-d7fd-499c-8005-73fcc84e7b2c
|
||||
---
|
||||
# How to: Use a ThicknessConverter Object
|
||||
|
||||
## Example
|
||||
|
||||
This example shows how to create an instance of <xref:System.Windows.ThicknessConverter> and use it to change the thickness of a border.
|
||||
|
||||
The example defines a custom method called `changeThickness`; this method first converts the contents of a <xref:System.Windows.Controls.ListBoxItem>, as defined in a separate [!INCLUDE[TLA#tla_xaml](../../../includes/tlasharptla-xaml-md.md)] file, to an instance of <xref:System.Windows.Thickness>, and later converts the content into a <xref:System.String>. This method passes the <xref:System.Windows.Controls.ListBoxItem> to a <xref:System.Windows.ThicknessConverter> object, which converts the <xref:System.Windows.Controls.ContentControl.Content%2A> of a <xref:System.Windows.Controls.ListBoxItem> to an instance of <xref:System.Windows.Thickness>. This value is then passed back as the value of the <xref:System.Windows.Controls.Border.BorderThickness%2A> property of the <xref:System.Windows.Controls.Border>.
|
||||
@@ -25,6 +27,6 @@ ms.assetid: 52682194-d7fd-499c-8005-73fcc84e7b2c
|
||||
- <xref:System.Windows.Thickness>
|
||||
- <xref:System.Windows.ThicknessConverter>
|
||||
- <xref:System.Windows.Controls.Border>
|
||||
- [How to: Change the Margin Property](https://docs.microsoft.com/previous-versions/dotnet/netframework-3.5/ms750561(v=vs.90))
|
||||
- [How to: Convert a ListBoxItem to a new Data Type](https://docs.microsoft.com/previous-versions/dotnet/netframework-3.5/ms749147(v=vs.90))
|
||||
- [How to: Change the Margin Property](/previous-versions/dotnet/netframework-3.5/ms750561(v=vs.90))
|
||||
- [How to: Convert a ListBoxItem to a new Data Type](/previous-versions/dotnet/netframework-3.5/ms749147(v=vs.90))
|
||||
- [Panels Overview](../controls/panels-overview.md)
|
||||
|
||||
Reference in New Issue
Block a user