Exemple #1
0
        void SetElementColor(string elementName, Color c)
        {
            Skin        currentSkin = FormSkins.GetSkin(defaultLookAndFeel1.LookAndFeel);
            SkinElement element     = currentSkin[elementName];

            element.Image.SetImage(GetImage(element.Image.Image, c), Color.Transparent);
        }
Exemple #2
0
        public static void SetDefaultAppearance()
        {
            WindowsFormsSettings.SetDPIAware();
            WindowsFormsSettings.EnableFormSkins();
            WindowsFormsSettings.AllowPixelScrolling = DefaultBoolean.True;
            WindowsFormsSettings.ScrollUIMode        = ScrollUIMode.Touch;
            ((UserLookAndFeelDefault)UserLookAndFeelDefault.Default).LoadSettings(() =>
            {
                var skinCreator = new SkinBlobXmlCreator("HybridApp", "PreciousUI.SkinData.", typeof(Program).Assembly, null);
                SkinManager.Default.RegisterSkin(skinCreator);
                SplashScreenManager.RegisterUserSkin(skinCreator);
            });
            WindowsFormsSettings.DefaultFont     = PrimaryFont;
            WindowsFormsSettings.DefaultMenuFont = PrimaryFont;
            UserLookAndFeel.Default.SetSkinStyle("HybridApp");
            Image caption = GetFormCaptionImage(PrimaryColor);

            FormSkins.GetSkin(UserLookAndFeelDefault.Default)[FormSkins.SkinFormCaption].SetActualImage(caption, true);
            FormSkins.GetSkin(UserLookAndFeelDefault.Default)[FormSkins.SkinFormFrameBottom].SetActualImage(caption, true);
            FormSkins.GetSkin(UserLookAndFeelDefault.Default)[FormSkins.SkinFormFrameRight].SetActualImage(caption, true);
            FormSkins.GetSkin(UserLookAndFeelDefault.Default)[FormSkins.SkinFormFrameLeft].SetActualImage(caption, true);
        }
 private Skin GetCurrentSkin()
 {
     return(FormSkins.GetSkin(defaultLookAndFeel1.LookAndFeel.ActiveLookAndFeel));
 }