Пример #1
0
        public MainWindow()
        {
            InitializeComponent();
            MyModelObject myButton1DataContext = new MyModelObject()
            {
                Name = "I'm Button 01"
            };
            MyModelObject myButton2DataContext = new MyModelObject()
            {
                Name = "I'm Button 02"
            };

            Button1.Content = myButton1DataContext.Name;
            Button2.Content = myButton2DataContext.Name;
        }
Пример #2
0
        public MainWindow()
        {
            InitializeComponent();
            MyModelObject boton1DataContext = new MyModelObject()
            {
                Name = "Soy un boton"
            };
            MyModelObject boton2DataContext = new MyModelObject()
            {
                BadName = "Soy el boton 2"
            };

            boton1.DataContext = boton1DataContext;
            boton2.DataContext = boton2DataContext;
        }
Пример #3
0
        public MainWindow()
        {
            InitializeComponent();
            MyModelObject butt1DataContext = new MyModelObject()
            {
                Name = "I'm button 1"
            };
            MyModelObject butt2DataContext = new MyModelObject()
            {
                Name = "I'm button 2"
            };

            butt1.DataContext = butt1DataContext;
            butt2.DataContext = butt2DataContext;
        }//ctor
Пример #4
0
 public string Render(MyModelObject obj)
 {
     return(obj.Name);
 }
Пример #5
0
 public WindowsMenuFlyoutItem(MyModelObject inner)
 {
     this.Text    = inner.GetTitle().Text;
     this.Tapped += WindowsMenuFlyoutItem_Tapped;
     Windows.UI.Xaml.Controls.ToolTipService.SetToolTip(this, "tooltip...");
 }