Exemple #1
0
        private static void TemplateExample()
        {
            // This class will generate new bitmap, that can be used for Layered.Theme.
            // Layered.Template intended for debug/development stage.
            var template = new Layered.Template(Resources.ThemeMaterialShadow_Original, Resources.ThemeMaterialShadow_Margin);

            // This is how you can save generated bitmap
            //template.Bitmap.Save($"{Application.StartupPath}/MaterialDesignShadowTheme.png");

            // With inner rectangle you can create Layered.Metrics, or pass it as
            // argument while creating Layered.Theme. In last case, Layered.Metrics
            // will be created by constructor of Layered.Theme.
            Debug.WriteLine(template.InnerRectangle);

            // If you're specified margin mask in Layered.Template constructor,
            // in production, creating Layered.Theme, you can pass this variable.
            Debug.WriteLine(template.Margin);

            // Using testing form, you can debug generated result
            Application.Run(template.Form);
        }
Exemple #2
0
        private static void TemplateExample()
        {
            // This class will generate new bitmap, that can be used for Layered.Theme.
            // Layered.Template intended for debug/development stage.
            var template = new Layered.Template(Resources.ThemeMaterialShadow_Original, Resources.ThemeMaterialShadow_Margin);

            // This is how you can save generated bitmap
            //template.Bitmap.Save($"{Application.StartupPath}/MaterialDesignShadowTheme.png");

            // With inner rectangle you can create Layered.Metrics, or pass it as
            // argument while creating Layered.Theme. In last case, Layered.Metrics
            // will be created by constructor of Layered.Theme.
            Debug.WriteLine(template.InnerRectangle);

            // If you're specified margin mask in Layered.Template constructor,
            // in production, creating Layered.Theme, you can pass this variable.
            Debug.WriteLine(template.Margin);

            // Using testing form, you can debug generated result
            Application.Run(template.Form);
        }