Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 aRichTextBox和 aTextBlock嵌套在 a 中DataTemplate。我正在尝试将它们绑定到动态内容,其中包括超链接和图像(所以我不能使用该Text属性)。
RichTextBox
TextBlock
DataTemplate
Text
我如何能够将这些属性绑定到内容?
您不能直接绑定到不是DependencyProperty.
DependencyProperty
一种解决方法是子类化RichTextBox并添加一个DependencyProperty. 您将通过设置 的值来实现您的新属性RichTextBox.Document。
RichTextBox.Document
我在通过 ssh2_exec 通过 php 传递以下命令时遇到问题,命令是
./prog cat <<EOF a a a b b c d d EOF
问题是第一行'cat <<EOF',php 将“EOF”作为一个特殊的词,我希望
'cat <<EOF'