SparkleShare.SparkleAbout.CreateAbout C# (CSharp) Method

CreateAbout() private method

private CreateAbout ( ) : void
return void
        private void CreateAbout()
        {
            Image image = new Image () {
                Width  = 720,
                Height = 260
            };

            image.Source = SparkleUIHelpers.GetImageSource ("about");

            Label version = new Label () {
                Content    = "version " + Controller.RunningVersion,
                FontSize   = 11,
                Foreground = new SolidColorBrush (Colors.White)
            };

            this.updates = new Label () {
                Content    = "Checking for updates...",
                FontSize   = 11,
                Foreground = new SolidColorBrush (Color.FromArgb (128, 255, 255, 255))
            };

            TextBlock credits = new TextBlock () {
                FontSize     = 11,
                Foreground   = new SolidColorBrush (Colors.White),
                Text         = "Copyright © 2010–" + DateTime.Now.Year + " Hylke Bons and others.\n" +
                    "\n" +
                    "SparkleShare is Open Source software. You are free to use, modify, " +
                    "and redistribute it under the GNU General Public License version 3 or later.",
                TextWrapping = TextWrapping.Wrap,
                Width        = 318
            };

            SparkleLink website_link = new SparkleLink ("Website", Controller.WebsiteLinkAddress);
            SparkleLink credits_link = new SparkleLink ("Credits", Controller.CreditsLinkAddress);
            SparkleLink report_problem_link = new SparkleLink ("Report a problem", Controller.ReportProblemLinkAddress);
            SparkleLink debug_log_link = new SparkleLink ("Debug log", Controller.DebugLogLinkAddress);

            Canvas canvas = new Canvas ();

            canvas.Children.Add (image);
            Canvas.SetLeft (image, 0);
            Canvas.SetTop (image, 0);

            canvas.Children.Add (version);
            Canvas.SetLeft (version, 289);
            Canvas.SetTop (version, 92);

            canvas.Children.Add (this.updates);
            Canvas.SetLeft (this.updates, 289);
            Canvas.SetTop (this.updates, 109);

            canvas.Children.Add (credits);
            Canvas.SetLeft (credits, 294);
            Canvas.SetTop (credits, 142);

            canvas.Children.Add (website_link);
            Canvas.SetLeft (website_link, 289);
            Canvas.SetTop (website_link, 222);

            canvas.Children.Add (credits_link);
            Canvas.SetLeft (credits_link, 289 + website_link.ActualWidth + 60);
            Canvas.SetTop (credits_link, 222);

            canvas.Children.Add (report_problem_link);
            Canvas.SetLeft (report_problem_link, 289 + website_link.ActualWidth + credits_link.ActualWidth + 115);
            Canvas.SetTop (report_problem_link, 222);

            canvas.Children.Add (debug_log_link);
            Canvas.SetLeft (debug_log_link, 289 + website_link.ActualWidth + credits_link.ActualWidth +
                report_problem_link.ActualWidth + 220);
            Canvas.SetTop (debug_log_link, 222);

            Content = canvas;
        }