CornerRadiusFilterConverter クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
既存の CornerRadius 構造体を新しい CornerRadius 構造体に変換し、フィルターを適用して指定したフィールドのみを抽出し、他のフィールドは 0 に設定します。
public ref class CornerRadiusFilterConverter 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 CornerRadiusFilterConverter 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 CornerRadiusFilterConverter 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 CornerRadiusFilterConverter : 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 CornerRadiusFilterConverter : DependencyObject, IValueConverter
Public NotInheritable Class CornerRadiusFilterConverter
Inherits DependencyObject
Implements IValueConverter
- 継承
- 属性
-
Microsoft.UI.Xaml.CustomAttributes.MUXContractPropertyAttribute ActivatableAttribute MarshalingBehaviorAttribute ThreadingAttribute VersionAttribute ContractVersionAttribute
- 実装
例
ヒント
詳細、設計ガイダンス、およびコード例については、「 コーナー半径」を参照してください。
次の例は、CornerRadiusFilterConverter 要素の使用方法を示しています。
<ControlTemplate TargetType="Button">
<Grid>
<Grid.Resources>
<CornerRadiusFilterConverter Filter="Top" x:Name="TopCornersFilter" />
</Grid.Resources>
<Border Background="{TemplateBinding Background}"
CornerRadius="{Binding CornerRadius,
RelativeSource={RelativeSource TemplatedParent},
Converter={StaticResource TopCornersFilter}}"
Padding="{TemplateBinding Padding}">
<ContentPresenter />
</Border>
</Grid>
</ControlTemplate>
注釈
Binding または TemplateBinding で CornerRadiusFilterConverter を使用して、既存の 1 つから新しい CornerRadius 構造体を作成し、一部のフィールドのみを抽出し、他の構造体は 0 に設定したままにします。
コンストラクター
CornerRadiusFilterConverter() |
CornerRadiusFilterConverter クラスの新しいインスタンスを初期化します。 |
プロパティ
Dispatcher |
常に Windows アプリ SDK アプリで を返します |
DispatcherQueue |
このオブジェクトが |
Filter |
CornerRadiusFilterConverter に適用されるフィルターの種類を取得または設定します。 |
FilterProperty |
Filter 依存関係プロパティを識別します。 |
Scale |
CornerRadiusFilterConverter に適用されるスケール乗数を取得または設定します。 |
ScaleProperty |
Scale 依存関係プロパティを識別します。 |
メソッド
適用対象
こちらもご覧ください
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示