0

我想从 MainWindow.xaml.cs 文件中更改运行时的源属性。我当前的代码显示在此处。

                <controls:StartVideoCallButton Name="accountString" Source="sip:stj@starck.onmicrosoft.com" Height="75" Width="314" Background="#FFC7C7C7"></controls:StartVideoCallButton>
4

1 回答 1

2

这对我有用:

accountString.Source = "sip:new.sip@company.com";

或者您可以使用MVVM模式绑定源属性以将您的 UI 与业务逻辑分开 - 这是 WPF 应用程序的首选方法

于 2012-03-16T09:51:58.620 回答