コード例 #1
0
            public void BindingInOnPlatform(bool useCompiledXaml)
            {
                ((MockPlatformServices)Device.PlatformServices).RuntimePlatform = Device.iOS;
                var p = new Bz44213(useCompiledXaml);

                p.BindingContext = new { Foo = "Foo", Bar = "Bar" };
                Assert.AreEqual("Foo", p.label.Text);
                ((MockPlatformServices)Device.PlatformServices).RuntimePlatform = Device.Android;
                p = new Bz44213(useCompiledXaml);
                p.BindingContext = new { Foo = "Foo", Bar = "Bar" };
                Assert.AreEqual("Bar", p.label.Text);
            }
コード例 #2
0
ファイル: Bz44213.xaml.cs プロジェクト: sung-su/maui
            public void BindingInOnPlatform(bool useCompiledXaml)
            {
                mockDeviceInfo.Platform = DevicePlatform.iOS;
                var p = new Bz44213(useCompiledXaml);

                p.BindingContext = new { Foo = "Foo", Bar = "Bar" };
                Assert.AreEqual("Foo", p.label.Text);
                mockDeviceInfo.Platform = DevicePlatform.Android;
                p = new Bz44213(useCompiledXaml);
                p.BindingContext = new { Foo = "Foo", Bar = "Bar" };
                Assert.AreEqual("Bar", p.label.Text);
            }