0
我已经在xaml中绑定了我的文本块,是否可以将值存入我的编码中?如何获取文本块绑定值?
我的编码结合
<TextBlock Height="40" HorizontalAlignment="Left" Margin="8,24,10,0" Name="txtBlockCustName" Text="{Binding CustName, Mode=OneWay}" VerticalAlignment="Top" FontSize="26" />
我希望把我的MainPage.xaml.cs中像
string CustName = txtBlockCustName.Text;
,但它有错误..
也许http://stackoverflow.com/a/4364974/296526是你在找什么。 – Aphelion
错误是什么? –
它在当前内容中不存在。 –