Does anyone know of a layout control that I can give it multiple controls and tries to organise them on the screen?
I want something like a wrap panel, but the controls have different sizes and ideally I want to minizmise the empty spaces between them.
I am building a workaround class to do that, same reason that your
but if you looking for a paid solution this guys have nice dashboard windows metro style based
Related
I am doing a Silverlight+XNA game for windows phone 7 and I need to have a xaml animation which can appear in multiple pages. What is the best practice for doing this?
Thanks in advance.
Depending on what you mean by animation, and the way it is implemented, one of the most obvious ways would be putting it in a XAML ResourceDictionary, either through a separate XAML file, or part of the core App.xaml.
Making a user control would be a good way of going about it. Make a User Control with an image in it. Let the user control set the Image and run the animations.
I'm trying to build an app in winforms with something similiar to masterpages in asp.net - a menu on top and when choosing an option from the menu the entire screen on the bottom will change while the menu remains (there are 10-15 screens in the future app, some are quite similar, some are not).
What is the best way of doing this? Should I use different forms for each screen or use a panel or something else?
If I use a panel or something how do I manage to use the designer with so many panels taking space on the screen?
Try with the MDIParent Form's. View the Example
http://www.codeproject.com/Articles/12514/Multi-Document-Interface-MDI-tab-page-browsing-wit
If it is just keeping the same menu and opening/closing parts of the UI you could simply add and remove instances of usercontrols to the main form.
If you need more features such as docking (like Visual Studio) look at this
Another option is to use Form inheritance
Which one to select depends on what you want to reuse and the features you need.
One option would be to make your application an MDI window and then load entire forms, maximized, into the parent window.
Then, you would be able to treat each form as its own self-contained item, since it really would be exactly that.
Is it not an option for you to use WPF? A WPF browser application fits the paradigm you are describing quite well.
I need a WPF control that acts like the Panorama control for Windows Phone 7, but I need it for a desktop application.
It will contain a series of panels (or Panorama Items) that the application will be able to slide through horizontally programmatically.
Also, the content inside the panels not currently displayed on the screen will need to be "lazy loaded". In other words, they should be referenced but not loaded or rendered.
Can I somehow adapt the WP7 Panorama control to do this? Or will I have to develop a custom control from scratch to behave similarly to it?
Thank you!
EDIT:
I could probably use a VirtualizingPanel to implement the lazyload behaviour.
MahApps.Metro while still not super mature does allow for the wp7 Panorama control. Demo of how to use a panorama here. I've played with it a little and while its not the most customizable thing out there it gets the job done. Pretty sweet. Also Sacha Barber (Codeproject Demigod) wrote up an article on making your own. Of which I haven't looked at yet but, the guy usually does awesome work. So I'd check that one out as well.
http://blogs.microsoft.co.il/blogs/arielbh/archive/2010/10/21/porting-windows-phone-7-s-panorama-control-to-silverlight-4.aspx gives some clues about how do to this.
It suggests using http://phone.codeplex.com/ as your base and then you can use http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=4b281bde-9b01-4890-b3d4-b3b45ca2c2e4 (Microsoft Surface Manipulations and Inertia Sample for Microsoft Silverlight) to run convert get it to respond to touch.
Seems none exist as far as I can see so far.
This blog has started an attempt at making it, so you could work from there to make your own. Be sure to also check out this page which details the creation of an individual panorama item too.
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.
Instead of arranging controls on a winform form by specifying pixel locations, I'd like to lay it out similar to the way you'd layout a form in html. This would make it scale better (for larger fonts etc).
Does anyone know of a layout library that allows you to define the form in xml and lay it out similar to html?
Have you checked out the TableLayoutPanel and FlowLayoutPanel in the .NET framework? It might be what you are looking for.
Yeah, it's called WPF :)
Seriously, there are some newer panel types in WinForms 2.0 that will let you place controls without setting Location and Size. They are FlowLayoutPanel and TableLayoutPanel.
You should also look into the AutoSize property. It takes care of sizing when the value of the label, say, changes. Also, don't forget about Docking and Anchoring.
Once you master those concepts, writing a little parser that converts from XML to controls shouldn't be that hard if you feel you really need it.
Not sure there is anything perfect for this.
MyXAML was kicking about a few years ago that enabled you to add forms in XML as opposed to embedding them into the binary. Not sure if that project is dead or not.
WinForm does have the flow layout control already
However if you want to do this kind of thing properly I think the only answer is to move to WPF.
You may also want to consider using Windows Presentation Foundation (WPF) instead of WinForms - WPF has an XML declarative markup language (XAML) that works well for defining scalable UI.
I've already got something like MyXAML - my screens are loaded from xml files already. It suffers the same problem as MyXAML which is that you still have to position the controls with pixel positions whereas I want something like html with the automatic flow and tables and such.
I think TableLayoutPanel might be what I'm looking for.
The only one I know of is a 3rd party from DevExpress called the LayoutControl..