none
Bunifu Framework - Using a Bunifu Button RRS feed

  • Question

  • Good Afternoon,

    I'm trying to build a modern UI in C# but I'm having some trouble. I downloaded the trial version of Bunifu and installed it following the instructions provided. All of the tutorials that I've found have said to use the Bunifu Flat Button but I don't have that in my toolbox. All I have is Bunifu Button. When I use that I can't get it selected when I click on it. I want the button to become selected if I click on it. There is no selected method for the Bunifu Button. I can't find any info anywhere on how to do this. Any help would be greatly appreciated.

    This is the code that every tutorial says to try:

    private void B1_Click(object sender, EventArgs e)
            {
                ((Bunifu.Framework.UI.BunifuFlatButton)sender).selected = true;
                
    
            }

    I've tried to do this with the Bunifu Button but haven't had any luck:

     private void B1_Click(object sender, EventArgs e)
            {
                ((Bunifu.UI.WinForms.BunifuButton.BunifuButton)sender).Select();
                
    
            }

    Thank you in advance for your help!

    Sincerely,

    Steven

    • Moved by CoolDadTx Monday, July 8, 2019 2:06 PM Third party product
    Saturday, July 6, 2019 8:20 PM

All replies

  • Hi steven85791,

    Thank you for posting here.

    Since this thread is related to Bunifu Framework, I suggest that you could post it in the following forum.

    https://bunifuframework.com/forums/

    The Visual C# forum discusses and asks questions about the C# programming language, IDE, libraries, samples, and tools.

    Note:This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, July 8, 2019 7:59 AM
  • Hi

    Adding Bunifu Flat Button at Run Time

    We will use form Load event to add the following code:

    C# code

    private void Form1_Load(object sender, EventArgs e) {     var newButton = new Bunifu.Framework.UI.BunifuFlatButton();     this.Controls.Add(newButton); }

    With above code you should see something like this:

    Custom properties

    We have three sets of custom properties

    Color properties

    • colbackground -  This property allows you to set the background color of the button (it will take effect whenever you hover the button for the first time).
    • colhover - This property sets the color of the button when hovered
    • colselected & Activecolor  - This property sets the color of the button when clicked
    • Normalcolor - This property sets the default color of the button 
    • OnHoverColor - This property works the same way as colhover property 
    • OnHoverTextColor -  This property allows you to set the color of the text on the button when hovered

    Image Properties

    • limage or IconImage - This property allows you to set an image on the left side of the button
    • rimage or Iconimage_right - This property allows you to set an image on the right side of the button

    Visibility Properties

    • iconVisible and iconRightVisible -  This prpperty allows you to choose whether to show or hide the image on the button
    • iconZoom - This property allows you to set the zoom of the image

    The sample code below show the properties in action:

    C# code

    private void Form1_Load(object sender, EventArgs e)

    {

    this.bunifuFlatButton1.Normalcolor = Color.Purple;

    this.bunifuFlatButton1.OnHovercolor = Color.Red;

    this.bunifuFlatButton1.Activecolor = Color.Black;

    this.bunifuFlatButton1.colbackground = Color.Blue;

    this.bunifuFlatButton1.colhover = Color.Red;

    this.bunifuFlatButton1.colselected = Color.Red;

    this.bunifuFlatButton1.Activecolor = Color.Yellow;

    this.bunifuFlatButton1.Iconcolor = Color.Violet;

    this.bunifuFlatButton1.IconZoom = 100;

    this.bunifuFlatButton1.IconRightVisible = false;

    }

    Best Regards.

    Hakim

    Sunday, July 28, 2019 8:29 AM