간단한 Windows 8.1 앱을 작성하고 있습니다. 내 xaml 파일 이름은 AdditionPage.xaml입니다. 나는변수를 xaml 페이지에 전달합니다.
다음 코드를 사용하여 두 개의 난수를 생성하는 AdditionPage.xaml.cs의 배경에서 발생하는 몇 가지 코드를 가지고 :
namespace MathGame
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class AdditionPage : Page
{
public AdditionPage()
{
this.InitializeComponent();
Return_Addition();
}
/// <summary>
/// Invoked when this page is about to be displayed in a Frame.
/// </summary>
/// <param name="e">Event data that describes how this page was reached.
/// This parameter is typically used to configure the page.</param>
public int AddLeftNumber_1 { get; set; }
public int AddRightNumber_1 { get; set; }
public int sum { get; set; }
//public double Height { get; set; }
// generate random numbers using the randomizer
Random Randomizer = new Random();
내가 생성 된 번호 AddLeftNumber_1 및 AddRightNumber_1에 표시하는 방법을 모른다 xaml 페이지. 바인딩을 사용해야한다는 것을 알고 있습니다. 어떤 아이디어?
바인딩에 접지를 얻을 필요가있다. 나는 여전히 틀린 일을하고있을거야. 위의 코드를 업데이트했습니다. – Sophman
덕분에 도움이됩니다. 나는 아직도 그것을 일하게 할 수 없다. 나는 계속 노력할 것이다. – Sophman