c# - 具有私有(private) setter 的 UWP DependencyProperty

标签 c# uwp dependency-properties

在 WPF 中,您可以使用 DependencyPropertyKey 将依赖项属性注册为只读。但是,这似乎不适用于 UWP。是否有替代方案,或者他们是否删除了只读依赖属性?

最佳答案

DependencyProperty docs 中所述

The Windows Runtime does not provide a way to register a custom dependency property as read-only.

关于c# - 具有私有(private) setter 的 UWP DependencyProperty,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43440197/

相关文章:

c# - 如何使用验证保持 ViewModel 和 View 同步

c# - WPF:DependencyProperty 适用于 TextBlock 但不适用于自定义控件

c# - 在 C# 中创建 RGB 类 Color

c# - UWP:后台任务中的音频媒体捕获

c# - 接收具有不同编码的发布数据

c# - 如何使用 DataTemplate 从 ItemsControl 获取 UIElement?

msbuild - 从 vNext 版本更改 appx 软件包版本

c# - WPF 窗口如何知道如何访问嵌套元素?

c# - 为什么需要冗余锁对象?

c# - SQL 服务器 : invalid object name in query execution