gpt4 book ai didi

c# - wpf 如何知道设置 Content 属性

转载 作者:太空宇宙 更新时间:2023-11-03 21:10:43 25 4
gpt4 key购买 nike

所以如果我在 XAML 中创建一个按钮,

<Button />

我可以通过几种方式之一设置内容

<Button Content="My Content" />

<Button>
My Content
</Button>

<Button>
<Button.Content>
My Content
</Button.Content>
</Button>

等等...

我的问题是,当用户以这种方式传递内容时

<Button>
My Content
</Button>

wpf 如何知道分配 Content 依赖属性?这是我想构建到我的控件中的非常巧妙的功能。

最佳答案

关于c# - wpf 如何知道设置 Content 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37929349/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com