Hi RadX,
I can answer your second question: quite a few things in the code-behind are pretty similar to WinForms, and IntelliSense helps you a lot. If you add a button in the designer, you can double-click it to get a boilerplate handler for it in the window's xaml.cs file. Then you could button1's click handler, for example, like this:
... and similarly for button2 and button3.Code:private void button1_Click(object sender, RoutedEventArgs e) { button1.Background = Brushes.Gold; button2.Background = Brushes.Blue; button3.Background = Brushes.Blue; }
Alternatively you could declare the buttons in the code, and assign click handlers in the initialization. Intellisense practically writes it for you:
Obviously, some things are different, such defining the Background as Brush instead of the BackgroundColor as a Color. Once again, Intellisense helps you.Code:public Window1() { InitializeComponent(); button1.Click+=new RoutedEventHandler(button1_Click); ///etc. }
BB




Reply With Quote