I need to create multiple containers which can be freely moved and resized by the user (within the main surface of the app). Basically I need multiframe GUI.
I didn't find the existing control in the toolbox. So the question is: do I have to create my own control for this purpose (with monitoring and processing OnClick, OnMove and other events) or there are some other solutions?
What you're asking for is something like the scatterview available for Microsoft PixelSense on Samsung SUR40. Currently there is no predefined control for that. You can implement your own drag and drop, and in a very basic fashion this isn't hard. Look at the Reactive Extensions ( they do support Metro Style apps in the latest release: http://channel9.msdn.com/Shows/Going+Deep/Bart-De-Smet-Rx-Updat-NET-45-Async-WinRT ). They have a sample how to do it very simple and basic.
I do want to advise you to rethink your application concept. For being a great Windows 8 style UI app, you should avoid introducing ui concepts that differ too much from what other apps are using (or what Microsoft is asking you to follow in terms of guidelines). Depending on what you want to drag, it might be useful to work with filters and a listview to present the content along with that drill-down like navigation concept (hub-section-detail).
One side note: to avoid later confusion: you're not going to use WPF but XAML. There are differences in features how it's implemented.
Related
I am currently learning WPF framework; I have some past (not much though) experience with Winforms. One problem I've had in both is that the menubar does not look native. I've found a workaround in Winforms, but I haven't been able to find anything for WPF. I've not had this problem in other frameworks I've used, particularly Qt.
In many pics I've seen, it looks native enough in Windows 7, but not Windows 10. I included some pics.
How it currently looks:
How it should look:
Thanks in advance!
Edit
While I have not seen the possible duplicate link, I am aware of setting the foreground/background on WPF controls. That link doesn't really answer my question. I don't want to come up with my own style at this point; all I want to do is make controls look native.
If custom styling is the only way, that's fine, but if there is another way, that would be preferable.
Thanks!
I don't think there's a quick fix to get what you want. WPF renders using DirectX, allowing for much more flexibility in styling applications. A WPF app should render exactly the same way on any version of Windows - it will not automatically adopt a native look and feel (that was actually one of the main selling points of the technology in its early days).
While MS made the default styling somewhat close to Windows at the time of release (Vista, I think?), if you want WPF controls to have a particular look you're going to have to style them yourself.
So over the years I have seen quite a few C# and VB applications which have custom UI designs. One of which I can give an example of is the DayZCommander (C#) application which looks like this:
I was wondering this because I wanted to start making login forms which look like this (note this is just a photoshop render):
And just use it for overall form design.
If you can give me some information, or an answer on this topic please do.
Thanks.
First of all you'll have to use WPF to easily achieve these kinda results (It might be possible with WinForms but it will very hard).
You can also use 3rd party controls like MahApps Metro (also available using NuGet). Here's an example of what you can end up with :
You have also tools like Microsoft Expression Blend that will make creating animated UIs/Custom control templates very easy. but sooner or later you'll to dive in XAML to create your own custom control templates but that's beyond the scope of this answer (there are plenty of good tutorials online).
I was working with a WPF application and I decided that the controls and graphics I wanted to display on the grid might look better if it was a silverlight component.
I thought this way because of all the cool silverlight controls that look very flash-like.
But now that I have gottem my Visual Studio 2010 set up with SIlverlight, it seems that every silverlight app I can make are ASP.NET in nature. It seems that instead of a cool GUI control to make, Silverlight is telling me that it is primarely a dataflow sort of application for the web.
What is the relationship, if any, between WPF and Silverlight. Can I or can I not put a silverlight control into my existing WPF application?
It's my understanding that Silverlight is like "WPF lite", and that in many ways they are almost the same thing but made for different purposes (desktop vs. web). If you want your wpf application to have a different look, you don't need to bring in any other controls from silverlight, because you can simply re-style or re-template them to suit your needs (which you can also do in silverlight). But you can't simply use silverlight controls in wpf because they're compiled to run on different runtimes.
Silverlight does have a number of un-official controls in the silverlight toolkit which are not included in wpf or the wpf toolkit. They are open source, and if you really want, you could port them to wpf, especially since the code is very similar to wpf.
Silverlight is essentially a subset of WPF that is used to create web-based applications.
You might be able to jump through some hoops to get a limited Silverlight application running in WPF, but I doubt it would be worth it...
I know others may point out that SL is WPF lite.
But hope you find out they are different frameworks at least right now though they share XAML, and a similar model.
Not sure if in the future they become the same, but keep the differences in mind is critical at this moment. :)
We know DevExpress is now shipping the same code base of their components for WPF and SL, but that does come after putting a lot of efforts.
http://community.devexpress.com/blogs/ctodx/archive/2010/04/20/merging-our-silverlight-and-wpf-ui-controls.aspx
I am about to write a front end app, which will be used as a media center app. It will plug directly into a high definition TV. Essentially transforming my laptop into a media player. While this concept is not new, I want custom functionality, so this is why I am not reusing existing products.
I'm a C# developer, so the app should ideally be written in C#. And there is 1 other consideration, I need to accept input via the MCE Remote.
I was considering using Silverlight for this. Would you recommend this? Or any other recommendations for frameworks before I begin planning around this.
Thanks in advance.
This is the type of stuff that the Windows Presentation Foundation was meant for. You'll get a lot more access to the hardware than Silverlight would provide (I.E. that MCE remote you mentioned). You mark up your UI with vector graphics/XAML, and then perform the logic with C#.
EDIT: WPF also has support out of the box for animations which can make your UI a lot more interactive.
EDIT 2: Scott Hanselman has written a really cool application called BabySmash and posted the source online. It basically intercepts keyboard input and shows shapes and sounds on the computer. It's a good "child-proofing" method for your PC. The code could provide you with some insight into WPF and how to do the animations and interactivity that you're looking for.
Is this a desktop app? If so I would use WPF. Silverlight is a subset of WPF, so using WPF you could potentially do more.
Silverlight or WPF, if you want some extra power. Both have a similar programming model (with XAML and code-behind) so you might be able to start with Silverlight and move up to WPF if you need.
The VLC api might be useful for playing your media, someone has created a C# wrapper for it:
http://wiki.videolan.org/.Net_Interface_to_VLC
WPF is certainly the way to go, and for playing media check out the excellent WPF MediaKit: http://wpfmediakit.codeplex.com/ I've used it successfully in many projects.
I'm using WINFORMS not WPF.
I just know basic c# .net gui programming. I donot want the traditional windows look. I want to have my own custom look (eg. gtalk, antivirus softwares, media players, google chrome).
Actually I'm inspired by google's PICASA software. Its awesome. I want to do something like that.How can I do that? If there is something I should learn please point me.
Also I may have to write my own custom controls (like modified tree view etc..) I guess. Please give some good learning resources.
This article describes how to draw custom windows. The author also shows how to draw non-rectangular windows.
If you could use WPF instead of Windows Forms, this is a good article about customizing window drawing:
http://www.codeguru.com/csharp/.net/net_wpf/article.php/c16379/
There is also a question with some good answers here on SO:
Creating custom forms in WPF?
Update:
I think that skinning and custom drawing is fun to do from a programmers perspective, but I also think that there is almost no benefit for the user.
The creators of the platform you are developing for might have put a lot of effort into the design of their windowing toolkits.
If you just want to change some visual aspects of your application you also should take into account that you might miss some important other aspects of UI design:
consistency
accessibility
aesthetics (if you are overdoing
effects, gradients, ...)
internationalization
...
As you are developing for Windows, you also lose the skinning ability of the OS itself. And I think that some of the skins that come with newer versions of Windows are pretty good.
You can try any of the following:
telerik
Syncfusion
(source: componentsource.co.jp)
Or other components.
They do make your UI pretty.
Edit: if you want to study how they do it, you can buy the source code-- along with documentation and understand from there.
There are some commercial control libraries available.
I can recommend the Krypton Suite. It consists of the free Krypton Toolkit (which contains a lot of skinnable controls) and other non-free controls (Navigator, Ribbon, Docking, Workspace). It has some built-in palettes and renderers that allow you to make your UI look like Office 2010, Office 2007, Office 2003, ...
You want to look for +winforms +skinning. I haven't tried these, but the first hits don't look bad. Most decent skinning tools will be paid for.
From what you said, you want to develop your own custom controls. You have some frameworks for this like Qt which can use Direct3D for hardware accelerated graphics. It also have a Visual Studio plugin. There is a free LGPL version and a commercial version of it.
I remembered about Qt because you mentioned Picasa and as far as I remember, I heard the Picasa UI has been written through Qt.
You can try using "SetWindowRgn(..)" to set an arbitrary region for your window. This may range from giving a rounded rectangle shape to giving a weird looking shape to the form!
Check this out: Link.
There is another option if you are working in Vista(aero enabled), ie you can check out DwmExtendFrameIntoClientArea(..) function here: link text
You can set the form's border style to 'none' and go on to create your custom form! You then might have to create custom buttons to carry out tasks like close, minimise, maximise etc. You might even need to write code for drag and drop events..
For the background, you might need to have a look at the gradient fills to give a great effect, otherwise you can use great looking pictures as Background..! But the latter option isnt good unless you have really good pic.