How to use Transition Manager of DevExpress in C#? - c#

I want to add transitional effects to my form and let my panels come and go smoothly. I just found this component named "Transition Manager"(DevExpress) and I think it can help, but I don't know how.
I've already chose the control I want to fade away , but no visible success.
When I code like this:
transitionManager1.StartTransition(panel2);
I get error telling me that thread.cs can't be found in DevExpress.Utils!!
this component looks like this when added to windows form:
PS: If you know any component which is a borderless panel and features transitions, let me know please. Thanks.

Dev express has build-in transition control on several UI controls. Please check the properties of the specific control. eg:
this screenshot demonstrates the transition of two tab panel,
or you need provide the more details

Related

Default windows forms resizing behavior

If I have created a forms app and not specified anything out of the ordinary (just used Visual Studio's designer to drag and drop controls), what behavior should I expect when resizing the window? Does it differ based on what controls I used? Is there detailed documentation of this someplace I can reference?
(I hate asking something so vague and contrived, but I don't have access to Visual Studio and the developers who do aren't being helpful. As far as I know they're using C# and not using any sort of layout panel.)
It sounds to me like you need to know about anchoring and docking the various components, how they hold together, and how they behave when resizing the form. Please see this link for a guide on how to do this effectively, and how some of the various options work.
Controls on a WinForm application do not resize by default. Look at using the Anchor property on controls. For example. If you want a button to widen when you widen a form go to the Anchor property on the button and anchor the left and right sides. This will widen the button as the form widens.
You can think of the anchor as the parts that get "pulled" when a form moves.
See this post:
Auto size the controls in winform

How to accomplish different states of view in WPF Apps

I have an idea for a personal project. And I know one way of accomplishing it in Windows Forms (which I no longer wish to use). Basically I could (in WinForms) just draw everything onto the screen (Form) and then when I need to switch views/states of the application, just redraw the new stuff in the old stuff's place.
But how can we have different states in WPF? Is there a "right" or "proper" way of doing this? Is something like this covered somewhere in the docs?
I'd like to do my own searching, but I have no idea what exactly to look for, and current attempts at finding the right information, so far have yielded no helpful (or even relevant) results.
Any help at all will be greatly appreciated. I am new to WPF, but have been making a lot of progress this past week!
Thank you!
P.S.:
I just thouhght of something. If the solution was to draw what is needed for one screen, and when it is time to display the next screen, just dispose of/hide everything and create/display the new stuff, then how would we get around this? Because we can't/shouldn't change XAML markup at runtime, can/should we? :/
Not sure how you drawn your views/states in WinForms (direct painting on a Graphics object?).
The closest to what you're describing is the VisualStateManager. You can use it to statically define several visual states inside a single XAML and transit between them (using a smooth animation if you want).
If what you've done was show different Forms with Show/ShowDialog(), then the equivalent would be to use different Windows and Show/Hide them.
If you just cleared/added Controls to your form, then you can do just the same in WPF. Most Controls in WPF have a Content or Children property instead of Control.Controls in Forms.
I don't know if I understand what you really want. But here are my thoughts:
You can use several Windows and Show/Hide them accordingly
You can use the Frame/Page functionality in WP (MSDN)
if you really need to you could load your XAML and remove the topmost content in your Window and replace it with the loaded content
You could use the VisualStateGroup functionality to change the appearance of your current window
I think you will be happy with the second solution

How to change controls on a Windows form without changing the form itself

What I am trying to remember is the name of a windows form control which allows with an ID change allows programmer to move between its states, which are different panels with different controls on them. There is a control that does exactly this - but I can't remember its name at all. Do you know anything similar to this in C#?
edit: basically, I have a windows form. It has a panel. I want to, by changing panel's a specific property, I want to switch between its states, every state containing another set of windows form controls. I cannot, however, remember the name of this control. Any ideas? Sorry if my first wording is confusing.
It sounds like you mean something like a wizard? In asp.net webforms has a wizard control buy afaik the closest in windows forms is TabControl. But no matter; it is trivial to simply hide and show some Panel controls. It can be trickier to use the designer, of course - but you can lay them out next to each other and move then at runtime as needed.
Looks like there are a few wizards available for WinForms too
https://stackoverflow.com/questions/195255/best-wizard-control-for-net-windows-forms
http://www.codeproject.com/KB/cs/WizardDemo.aspx
And, well, plenty of others

C# Volume mixer like buttons/combo boxes

How would you get a button to look and perform similar to that of the buttons in the volume mixer on Win7?
What I mean is that in the volume mixer there are icons that doesn't look like buttons until you hover them, they also haven't got the standard blueish color when hovered.
So far I haven't found a way to do this directly in visual studio.
I'm guessing that creating a custom user control is the only way to go, but I've had no luck so far, I would appreciate some examples.
In addition, there are also combo boxes in the volume mixer I would like to duplicate. They're hidden except for the text and arrow until they're hovered.
Is there a way to accomplish this?
(Here an image that might help explain what I mean:
http://i53.tinypic.com/2ij409u.png)
For windows application, (and also how they did win7), they used the technology called WPF. I am not specifically answering how you can do this, because in WPF, this is the fundamental that defining skin (via markup called XAML) without touching the implementation code. If you are serious in learning how to do that, I suggest you look for tutorials or good book about WPF.
Here's one of the markup looks like for a button. To modify the button's look, what you need is to define it's XAML, and you don't have to inherit it in the code. The example looks scary long, but Visual Studio could help you.
You could use a third party control library, for example Krypton Toolkit, its free!
There is quite a terrific solution for this button quest. You can paste pictureBoxes on form and handle MouseUp, MouseLeft and MouseDown events. When each of them fires, you need to set specific image (one of tree, in fact) - normal picture, picture of "highlighted" icon and picture of pressed icon. But that's really a hard and useless work, so better don't.
If you need several of such "buttons" in a panel, I remember, I once managed to get the same behaviour by using toolStrip with buttons.

How to create a specific type of user control

I am trying to create a winForms user control. But I want would like a User control that - when placed on the form -- doesn't take any form space. Instead, it lodges itself nicely below like OpenFileDialog does.
First, what kind of user-created thing is this? Is it still called a "user control"? If not, that may explain why all of my searches are in vain. Secondly, what object do I need to start with to create something like this?
A gentle shove in the right direction would be VERY appreciated.
Thanks.
--Jerry
Controls that appear in the "component tray", like the Windows Forms Timer control, inherit from Component.
To create one with some automatic boilerplate code, right-click on a project and click Add... | Component
I believe you're talking about creating a Component.
Okay... I KNEW that... I feel an inch tall now.
I would love to retract the question and hide my stupidity, but I think I'll leave it up for everyone else who may be asking the same question and just need a gentle reminder, too.
Thanks for the whack on the noggin!!

Categories

Resources