Are there any WPF libraries similar to jQuery UI?
I especially like the Sortable interaction:
and Resizable interaction:
Would be great if these 2 interactions could be combined.
Thanks.
The panels are just an Expander in WPF world, as far as I can see. To make them "Sortable" you need to create a custom panel that works like a wrap panel and hosts Expanders, and add drag and drop functionality. Shouldn't be too hard to do, but I haven't seen one around (at least in free / open-source components).
Related
I know how to working layout controls (Grid, StackPanel, DockPanel, etc), but even so, I don't know how to can I combine their for create a good layout.
Has any resource or article talking about this?
You need to look this link for a great place to learn layout techniques.
WPF & Silverlight Layout Controls.
Layout Techniques.
It takes an example WinForm dialog and then goes on to making same for WPF.
Make layouts for all windows programs like Explorer, Control Panel, Picture viewer, etc. Making more and more common layouts will make you more and more comfortable.
I want to create a project in WPF for designing a custom report.
For this, I need a library to add controls to a panel, canvas, etc. with drag and drop at runtime.
Controls should be resizable and moveable with the mouse. Finally I want to print this.
Telerik's WPF controls contain the Diagram Control which supports the features you mention out of the box. I use it for a very similar scenario as you describe and it works well. The might be a counterpart offered by Infragistics as well.
With .NET framework's built in features and/or free libraries you will able to cover the drag&drop part. You will have to implement the rest yourself which is possible but too much to ask for one question.
Late reply, but I came across this. Take a look at this
There are 4 parts that show how to do a toolbox with what you're looking for.
I'm new to wpf and have just been given a project to create a set of custom controls which will be used to make a previous windows forms application more manageable and current. However I cannot seem to find much info with regards to customising the built in Listbox, this would involve preferably replacing the scroll bar and the +/- buttons with custom images etc..
Just wondered if anyone knows how to get at these ?
Thanks in advance.
Check here for the default control template of the listbox.You can customize the scrollviewer there to do what you are looking for.Check the below article to get started
Using Templates to Customize WPF Controls
Learn about WPF styling and templating. Other than that, the question is too generic for SO. Read the article (and perhaps google some more articles on the topic), try to style the listbox and come back with specific issues. WPF is not easy to get into, but it is definitely worth the time.
I'm trying to decide whether I should create a simple StackPanel with Buttons on it, or whether I should use the WPF ToolBar class to contain these buttons (I am creating a simple toolbar).
What are the pros and cons to using WPF's built-in ToolBar control?
So far, these are the only advantages I have seen:
The ToolBars can collapse when necessary; additional items are available from a context drop down.
If the ToolBar is contained within a ToolBarTray, multiple ToolBars can be repositioned relative to each other.
Are the any other benefits to the WPF ToolBar? Neither of these apply to my simple toolbar.
Accessibility might be better with the WPF Toolbar, because it shows itself to Windows UI Automation as a toolbar with toolbar buttons, rather than some random controls. You never know who'll use your software.
Another very small advantage is that buttons in the ToolBar will be styled correctly, whereas the buttons in the StackPanel will take on their default look. Not insurmountable by any means, but a little annoyance none-the-less.
I would say use the Toolbar, because you never know when the next project will come along and need it. You also never know when this project may need it. I don't think there is any real drawback to using it over a StackPanel and the advantage you didn't mention is you'll have more experiance with a built in control for the next project.
On the other hand, I don't see any harm in doing it with the StackPanel, only that if you need to extend functionallity in the future, you'll have to do some rework.
I know how to do custom drawing of a standalone Windows Forms ScrollBar because there are plenty of examples at places like codeproject.com. But how do you custom draw the scrollbars in controls you do not create yourself? For example a Panel can show scrollbars but how would I ensure that the scrollbars it shows are custom drawn?
Or maybe this is not possible and I would need to create my own version of a Panel so that they use my own custom drawing scrollbars?
The scrollbars you see most often, including those built into most winforms controls, are rendered by Windows and there is no way to override their appearance in WinForms short of implementing an entirely custom solution which completely takes over the rendering and behavior of the common scrollbar control. There are some commercial packagages which claim to do this (google winforms skinning).