Beispiel #1
0
        void AddLogicalElement(object sender, RoutedEventArgs e)
        {
            Button myButton = new Button();

            myButton.Content = "Happy birthday! " + System.DateTime.Now.TimeOfDay.ToString();
            CustomElement.SetSingleChild(myButton);
        }
Beispiel #2
0
        private void AddLogicalElement(object sender, RoutedEventArgs e)
        {
            var mybutton = new Button {
                Content = "Happy birthday! " + DateTime.Now.TimeOfDay
            };

            CustomElement.SetSingleChild(mybutton);
        }