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; }
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; }
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
public string Render(MyModelObject obj) { return(obj.Name); }
public WindowsMenuFlyoutItem(MyModelObject inner) { this.Text = inner.GetTitle().Text; this.Tapped += WindowsMenuFlyoutItem_Tapped; Windows.UI.Xaml.Controls.ToolTipService.SetToolTip(this, "tooltip..."); }