:::: MENU ::::
Browsing posts in: WInform

Accordion Image Slider winform control

We have seen a lot of image Slider Control for web built on jquery but I have created a Thumbnail image slider control for winform that can be used like an ordinary winform control with few lines of code,you can see the Output at bottom.Here is how you can utilize this control.Drop ImageAccordion,PictureBox,Label on the form from the tool box  where ImageAccordion is the control i created , you need to wire up these control like this.

and finally we need to subscribe the ThumbnailChanged event of ImageAccordion Control so we can change Full Preview Image

Accordion Image Slider

image accordion slider winform

Now i would explain in detail how this control works it self. This control is actually composed from three different control 1st of them is the left and right buttons. In order make button fancy i extended the button Class and painted the button graphics so we can get fancy effects,here is the code.

here is the output of AccordionButton you can change the HoverColor,DownColor and Face of the button by chaining Hover,Down Color and Face property respectively
buttons

the 2nd control is the thumbnail Box which shows the thumbnails with text in the slider this controls it self composed with a picture box and label.

here is output

thumbnailbox
Now finally we will compose the ImageAccordiong Control from buttons and thumbnail box we created.

image accordion

hope you like it. you can fork the complete solution on  github. Please share your thoughts.

Please follow and like us:

Click bubble effect winform button c-sharp

clickBubble

I never worked in WPF before but recently i worked on it and delivered a successful product by using  Material Design and MahaApps  which are great WPF open source UI libraries. These libraries contains great UI controls here is a snapshot.

MashUp

if you see on above image when mouse clicks on a control (button) it shows you a transparent circle which grows up and disappear gradually. So I just tried to replicate this bubble effect in WinForm desktop UI controls.
In order to get this functionality first of all we need to subscribe the Control Paint Event so we can paint transparent ellipse on it.

We need to identify the Point as origin of the ellipse where user clicked on it so I would subscribe Control Click Event. When user click on it we record the click point as origin and  start painting  ellipse repeatedly and gradually by increasing the radius of ellipse.

Timer is used to draw ellipse repeatedly to look like an animation.
here is the Timer Tick Event which invalidate the control , Every control has invalidate function which can be used to invoke Paint event of that control on demand.

These above three events plays important role so explained you in detail. Now i will encapsulate this functionality into a  Component so we can re use it.

Now we have created a component with Name ClickEffect successfully. Once we build it we see it in VS tool Box like this

ClickEffect

Now we will drop this newly created component on a form and bind Button control with this component by setting t its property like below

Clickeffect2

and finally you will get this result.  You can download the complete solution from here

clickBubble

Please follow and like us:

Mixing two mp3 or wav files using NAudio and Lame

NAudio is an open source .NET library which contains a lot of useful audio related classes.
but now here i will use it to mix the mp3 or wave files so that they can be played parallel
with different sound volume like an ordinary sound composer or mixer.

this function encode the wave stream into mp3 stream and returns back

Please follow and like us: