我有一个私人领域
private static Double myValue;
Run Code Online (Sandbox Code Playgroud)
在应用程序MainWindow类中.并且(在MainWindow类中)我定义了一个属性
public static Double MytValue
{
get { return myValue; }
}
Run Code Online (Sandbox Code Playgroud)
在MainWindow类的结构中,我有一个TextBox.我需要将它绑定到MytValue属性.在XAML中我写道:
<TextBox Name="tbxMyValue" Grid.Row="1" Grid.Column="2" TextAlignment="Center"
Text="{Binding Path=MyValue}" Width="Auto" Margin="10,0,10,15" IsEnabled="True" />
Run Code Online (Sandbox Code Playgroud)
但它没有效果.当myValue变量有值时,我在TextBox中看不到任何内容.为什么?请帮我.
当我想关闭应用程序本身时,有人可以回答如何关闭MFC基于对话框的应用程序中的主窗口吗?该应用程序是在MS VS 2010中创建的.非常感谢您提前.
尤金.