There's no problem if Mode=OneWay, but I have this:
Class:
namespace Halt
{
public class ProjectData
{
public static string Username {get;set;}
}
}
And XAML:
xmlns:engine="clr-namespace:Halt.Engine"
<TextBox Name="UsernameTextBox" HorizontalAlignment="Stretch" Margin="10,5,10,0" Height="25"
Text="{Binding Source={x:Static engine:ProjectData.Username}, Mode=TwoWay}"/>
This dont wanna work because of TwoWay mode. So how to fix it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…