Example #1
0
        static void Main(string[] args)
        {
            var app = new Program();

            try
            {
                var option = new InitializationOptions(app)
                {
                    //Using DP without device scaling mode
                    DisplayResolutionUnit = DisplayResolutionUnit.DP(),
                    UseSkiaSharp          = true
                };
                Forms.Init(option);
                if (Device.Idiom == TargetIdiom.TV)
                {
                    // UIControls.Init() should be called after Forms.Init()
                    UIControls.Init(new InitOptions(app));
                    CommonUI.Init(app);
                }
                else
                {
                    CommonUI.Init(app);
                    CommonUI.AddCommonThemeOverlay();
                }
                app.Run(args);
            }
            catch (Exception e)
            {
                Console.WriteLine($"Exception : {e.Message}");
            }
        }
Example #2
0
        static void Main(string[] args)
        {
            var app    = new Program();
            var option = new InitializationOptions(app)
            {
                DisplayResolutionUnit = DisplayResolutionUnit.DP(true),
                UseSkiaSharp          = true
            };

            Forms.Init(option);
            app.Run(args);
        }
Example #3
0
        static void Main(string[] args)
        {
            var app = new Program();

            try
            {
                var option = new InitializationOptions(app)
                {
                    //Using DP without device scaling mode
                    DisplayResolutionUnit = DisplayResolutionUnit.DP()
                };
                Forms.Init(option);

                // UIControls.Init() should be called after Forms.Init()
                UIControls.Init(new InitOptions(app));
                app.Run(args);
            }
            catch (Exception e)
            {
                System.Console.WriteLine($"Exception : {e.Message}");
            }
        }