CornerRadiusToThicknessConverter 類別

定義

將 CornerRadius 轉換為 Thickness,也會套用篩選,只擷取指定的欄位,讓其他人設定為 0。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 WinUI 2 for UWP (,請參閱Windows 應用程式 SDK命名空間) 。

public ref class CornerRadiusToThicknessConverter sealed : DependencyObject, IValueConverter
/// [Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=0)]
/// [Windows.Foundation.Metadata.Activatable(1)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Version(1)]
class CornerRadiusToThicknessConverter final : DependencyObject, IValueConverter
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Microsoft.UI.Xaml.XamlContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.XamlContract, 65536)]
class CornerRadiusToThicknessConverter final : DependencyObject, IValueConverter
[Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=0)]
[Windows.Foundation.Metadata.Activatable(1)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
public sealed class CornerRadiusToThicknessConverter : DependencyObject, IValueConverter
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Microsoft.UI.Xaml.XamlContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.XamlContract), 65536)]
public sealed class CornerRadiusToThicknessConverter : DependencyObject, IValueConverter
Public NotInheritable Class CornerRadiusToThicknessConverter
Inherits DependencyObject
Implements IValueConverter
繼承
CornerRadiusToThicknessConverter
屬性
Microsoft.UI.Xaml.CustomAttributes.MUXContractPropertyAttribute ActivatableAttribute MarshalingBehaviorAttribute ThreadingAttribute VersionAttribute ContractVersionAttribute
實作

範例

如需 WinUI 功能和控制項的範例,請參閱 XAML 控制項庫 範例應用程式。

如果您已安裝 XAML 控制項庫 應用程式, 請開啟應用程式以查看控制項運作情形

如果您沒有安裝 XAML 控制項庫應用程式,請從 Microsoft Store取得 WinUI 2.x 版本。

您也可以從 GitHub 檢視、複製和建置 XAML 控制項庫原始程式碼, (切換至 WinUI 3 預覽版控制項和功能的 WinUI 3 預覽分支) 。

建構函式

CornerRadiusToThicknessConverter()

初始化 CornerRadiusToThicknessConverter 類別的新實例。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 WinUI 2 for UWP (,請參閱Windows 應用程式 SDK命名空間) 。

屬性

ConversionKind

取得或設定將套用至 CornerRadiusToThicknessConverter的轉換種類。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 WinUI 2 for UWP (,請參閱Windows 應用程式 SDK命名空間) 。

ConversionKindProperty

識別 ConversionKind 相依性屬性。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 WinUI 2 for UWP (,請參閱Windows 應用程式 SDK命名空間) 。

Multiplier

取得或設定半徑乘數的值。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 WinUI 2 for UWP (,請參閱Windows 應用程式 SDK命名空間) 。

MultiplierProperty

識別 乘數 相依性屬性。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 WinUI 2 for UWP (,請參閱Windows 應用程式 SDK命名空間) 。

方法

Convert(Object, TypeName, Object, String)

將 CornerRadius 值轉換成 [粗細 ] 值,同時擷取 ConversionKind 指定的欄位, (讓其他人設定為 0) 。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 WinUI 2 for UWP (,請參閱Windows 應用程式 SDK命名空間) 。

ConvertBack(Object, TypeName, Object, String)

未實作。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 WinUI 2 for UWP (,請參閱Windows 應用程式 SDK命名空間) 。

適用於