Visualization: crud operation themes like Boostrap

Posted by: a.sharov on 27 January 2022, 11:49 am EST

    • Post Options:
    • Link

    Posted 27 January 2022, 11:49 am EST

    Hi.

    I would like to have themes like in Bootstrap( for example) where when I create entity, button is green, when edit – blue\purple, delete – red and so on. I mostly concerned about button colors but change shades of other controls can also be of any use.

    Where I can read more about this?

    Thanks in advance.

  • Posted 28 January 2022, 6:38 am EST

    Hi,

    Could you please tell us which C1 controls are you referring to? Also, please share details of your use case/requirements along with a screenshot/gif showing what you want to achieve so that we can assist you the best way possible?

    Regards

    Avnish

  • Posted 28 January 2022, 10:04 am EST

    Hi.

    Ok, let me clarify – you have theme controller and I would like based on type of operation (create,edit,delete) specify appropreate color for buttons. I have same controls for some entity but based on operation I want to specify colors of these controls (button for example – gree, blue, red like in Bootstrap).

  • Posted 31 January 2022, 5:54 am EST

    Hi,

    As per our understanding, you need to create different themes for different controls and assign them according to the control’s type of operation. You can easily do so by creating different custom themes using the C1ThemeDesigner App and applying these custom themes in your application using the C1ThemeController control. Kindly refer to the attached sample showing the same.

    You can find the C1ThemeDesigner app in your system at the location C:\Program Files (x86)\ComponentOne\Apps\v4.5.2. You can refer to the link below for any information regarding the use of C1ThemeController and the C1ThemeDesigner app.

    https://www.grapecity.com/componentone/docs/win/online-themes/overview.html

    Please let us know if you meant something else or if you need any other information.

    Regards

    Avnish

    ThemesSample.zip

  • Posted 1 February 2022, 4:59 pm EST

    Thank you very much for reply. Probably it is some trivial issue, but your sample throws on line

    this.c1ThemeController1.SetTheme(this.c1Button1, “CreateTheme”);

    C1.Win.C1Themes.Serialization.SerializerException

    HResult=0x80131500

    Message=String [Flat] does not represent an instance of type [C1.Win.C1Themes.ImageSetEnum].

    Source=C1.Win.C1Themes.4.5.2


    StackTrace:

    at C1.Win.C1Themes.Serialization.Serializer.ReadEnum(Type enumType)

    at C1.Win.C1Themes.EnumProp`1.SerializeReadProp(Serializer serializer, String propName, Type type, String objectName)

    at C1.Win.C1Themes.ThemeItem.C1.Win.C1Themes.Serialization.ISerializable.ReadProp(Serializer serializer, String propName, Type type, String objectName)

    at C1.Win.C1Themes.Serialization.Serializer.a(ISerializable A_0)

    at C1.Win.C1Themes.Serialization.Serializer.ReadObject(Type objType)

    at C1.Win.C1Themes.ThemeItemCollection.C1.Win.C1Themes.Serialization.ISerializable.ReadProp(Serializer serializer, String propName, Type type, String objectName)

    at C1.Win.C1Themes.Serialization.Serializer.a(ISerializable A_0)

    at C1.Win.C1Themes.Serialization.Serializer.ReadObject(ISerializable obj)

    at C1.Win.C1Themes.ThemeItem.SerializeReadProp(Serializer serializer, String propName, Type type, String objectName)

    at C1.Win.C1Themes.ThemeItem.C1.Win.C1Themes.Serialization.ISerializable.ReadProp(Serializer serializer, String propName, Type type, String objectName)

    at C1.Win.C1Themes.Serialization.Serializer.a(ISerializable A_0)

    at C1.Win.C1Themes.Serialization.Serializer.ReadObject(Type objType)

    at C1.Win.C1Themes.ThemeItemCollection.C1.Win.C1Themes.Serialization.ISerializable.ReadProp(Serializer serializer, String propName, Type type, String objectName)

    at C1.Win.C1Themes.Serialization.Serializer.a(ISerializable A_0)

    at C1.Win.C1Themes.Serialization.Serializer.ReadObject(ISerializable obj)

    at C1.Win.C1Themes.ThemeItem.SerializeReadProp(Serializer serializer, String propName, Type type, String objectName)

    at C1.Win.C1Themes.ThemeItem.C1.Win.C1Themes.Serialization.ISerializable.ReadProp(Serializer serializer, String propName, Type type, String objectName)

    at C1.Win.C1Themes.Serialization.Serializer.a(ISerializable A_0)

    at C1.Win.C1Themes.Serialization.Serializer.ReadObject(Type objType)

    at C1.Win.C1Themes.ThemeItemCollection.C1.Win.C1Themes.Serialization.ISerializable.ReadProp(Serializer serializer, String propName, Type type, String objectName)

    at C1.Win.C1Themes.Serialization.Serializer.a(ISerializable A_0)

    at C1.Win.C1Themes.Serialization.Serializer.ReadObject(ISerializable obj)

    at C1.Win.C1Themes.ThemeItem.SerializeReadProp(Serializer serializer, String propName, Type type, String objectName)

    at C1.Win.C1Themes.ThemeItem.C1.Win.C1Themes.Serialization.ISerializable.ReadProp(Serializer serializer, String propName, Type type, String objectName)

    at C1.Win.C1Themes.Serialization.Serializer.a(ISerializable A_0)

    at C1.Win.C1Themes.Serialization.Serializer.ReadObject(Type objType)

    at C1.Win.C1Themes.ThemeItemCollection.C1.Win.C1Themes.Serialization.ISerializable.ReadProp(Serializer serializer, String propName, Type type, String objectName)

    at C1.Win.C1Themes.Serialization.Serializer.a(ISerializable A_0)

    at C1.Win.C1Themes.Serialization.Serializer.ReadObject(ISerializable obj)

    at C1.Win.C1Themes.ThemeItem.SerializeReadProp(Serializer serializer, String propName, Type type, String objectName)

    at C1.Win.C1Themes.C1Theme.SerializeReadProp(Serializer serializer, String propName, Type type, String objectName)

    at C1.Win.C1Themes.ThemeItem.C1.Win.C1Themes.Serialization.ISerializable.ReadProp(Serializer serializer, String propName, Type type, String objectName)

    at C1.Win.C1Themes.Serialization.Serializer.a(ISerializable A_0)

    at C1.Win.C1Themes.Serialization.Serializer.ReadObject(ISerializable obj)

    at C1.Win.C1Themes.Serialization.Serializer.Read(ISerializable obj, XmlReader reader)

    at C1.Win.C1Themes.C1Theme.Load(Stream stream, C1ThemeFormat format)

    at C1.Win.C1Themes.C1ThemeController.b.aa()

    at C1.Win.C1Themes.C1ThemeController.GetThemeByName(String themeName, Boolean throwException)

    at C1.Win.C1Themes.C1ThemeController.f(String A_0)

    at C1.Win.C1Themes.C1ThemeController.a(Object A_0, String A_1)

    at C1.Win.C1Themes.C1ThemeController.SetTheme(Object control, String value)

    at ThemesSample.Form1.InitializeComponent() in c:\Users\C1ThemeSample\ThemesSample\Form1.Designer.cs:line 54

    at ThemesSample.Form1…ctor() in c:\Users\C1ThemeSample\ThemesSample\Form1.cs:line 17

    at ThemesSample.Program.Main() in c:\Users\C1ThemeSample\ThemesSample\Program.cs:line 19

  • Posted 2 February 2022, 7:04 am EST

    Hi,

    The sample we provided has the latest 21v3 release version of the C1Themes, if you are using an older version of C1 controls then it might throw an exception as there are changes in the newer versions of C1Themes. Could you please provide the version of the C1 controls you are using so that we can assist you further? Also, we have attached a sample using an older version of the C1Themes for your reference.

    Please let us know if you still face any issues or if you need any other information.

    Regards

    Avnish

    ThemesSample_Mod.zip

  • Posted 2 February 2022, 11:21 am EST

    Hi. My C1.Win.C1Themes.4.5.2 version is 4.5.20201.416. You modified sample works great, thank you.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels