Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
更改按钮内容以包含外部变量内容XAML_Xaml_Variables_Button_Radio Button_Richtextbox - Fatal编程技术网

更改按钮内容以包含外部变量内容XAML

更改按钮内容以包含外部变量内容XAML,xaml,variables,button,radio-button,richtextbox,Xaml,Variables,Button,Radio Button,Richtextbox,我试图制作一个按钮,它的内容有一个变量。有没有办法使按钮的内容成为RichTextBox,或者有没有更好的方法来尝试? 我只能为此编辑XAML代码,不能更改后面的C代码 我的RichTextBox是一个从外部源引入的变量,需要按钮内容来完成同样的操作 <RichTextBox Height="30" Width="300" xmlns:custom="clr-namespace:Tecan.VisionX.TouchTools.RUP.At

我试图制作一个按钮,它的内容有一个变量。有没有办法使按钮的内容成为RichTextBox,或者有没有更好的方法来尝试? 我只能为此编辑XAML代码,不能更改后面的C代码

我的RichTextBox是一个从外部源引入的变量,需要按钮内容来完成同样的操作

<RichTextBox Height="30" Width="300" xmlns:custom="clr-namespace:Tecan.VisionX.TouchTools.RUP.AttachedProperties;assembly=Tecan.VisionX.TouchTools.RUP" custom:AttachedUIProperties.VariableName="XYZ" custom:AttachedUIProperties.KeyboardMode="None" Margin="0,0,0,0"/>

<RadioButton x:Name="ABC" Content="(***I want this to be an outside variable***)"  xmlns:custom="clr-namespace:Tecan.VisionX.TouchTools.RUP.AttachedProperties;assembly=Tecan.VisionX.TouchTools.RUP" custom:AttachedUIProperties.VariableName="ABC" Margin="35,175,0,0"/>

我建议您创建一个自定义用户控件。此控件应该有一个富文本框和一个单选按钮。然后您应该创建一个usercontrol,然后对内容使用dependency属性。

这并不能回答这个问题。一旦你有足够的钱,你将能够;相反如果您有新问题,请单击按钮提问。如果此问题有助于提供上下文,请包含指向此问题的链接。-你知道我能否使用数据绑定,将RadioButton内容绑定到RichTextBox内容吗?