Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I'm trying to make a dashboard application, and I'm trying to create the layout rules for it and such and I'm not sure the best way to go about it. Originally I had a custom grid control, so I could add my custom controls to it easily enough. It worked in the sense that if you initially put stuff there, it was fine. But I want to implement a drag and drop facility in it and it kinda doesn't really like that.
The biggest annoyance is just detecting what position my mouse is on in terms of what row and column its in in the grid. So So I thought instead of a grid, I could use a Canvas, and just manually measure the grid slots. But I'm not sure if there's a better way. I'd like to mimic how on android, you can have widgets for the home screen and you can drag and drop them around the screen. I'd like it to just be like that essentially.
When dragging, I'd like have a green rectangle move instead of the thing and make it red if it overlaps with something else. Like I said, basically just like how android widgets work. I'd love some code examples since I'm new to WPF. If you've got any more general suggestions as well, that would be well appreciated.
Thank you!
check out blacklight and its newer version on github
the dashboard demo is what you need to look at.
You may have trouble to compile the code, but simply by removing the silverlight projects you can get the WPF demo running.
I know this is an old question. Creating this answer for anyone else who stumbles onto this question looking for a WPF Dashboard. I couldn't find any other Dashboards with dynamic widgets out in the wild so I created my own and I am sharing for anyone else who needs a better solution. This sounds like what Gentatsu was looking for in his initial question.
You can find it here:
https://github.com/DustinBryant/WpfDashboardControl
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm relatively new to Xamarin.Android and am looking to build something I did in WPF in Xamarin as an Android App.
In WPF I used an ItemsControl with an Image Tag and then bound them to it.
In Xamarin I have not found something like this though (only the RepeaterView which I found quite hard to figure out/implement it with images).
It should look like this:
I would like to populate this ListView (if it is one) with a List<Object> and load the URL of the images, stored in a property in the Object, into one Image each.
Now my question, how would I do it theoretically? I'm looking for keywords/tutorials/documentations on classes/controls that allow me to do something like that.
Help is greatly appreciated!
I think GridView is what you want. See this and this tutorials which show how to create apps looking like
(source: xamarin.com)
(source: xamarin.com)
So you should create a GridView and populate ImageViews as item and SetImageBitmap() from your List<>.
Android has a built-in GridView control, which are described in the official documentation. Xamarin also provides its own documentation here.
Each list control in android has an Adapter which is basically a provider of items for the control. The most appropriate solution for you is to create a class derived from BaseAdapter<T>, which is generic and can take the type you require. The items inside the adapter are then loaded as items into the ListView. This process is well described here.
Now you can create a custom item layout to display the images and "bind" the control properties inside the getView method of the custom adapter. Once again, for more information, you can see the Xamarin documentation.
Also I would recommend you to not use List<Object> but create a strongly typed list, which will have the properties you need. This will ensure better type safety.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have done a lot work on windows forms, In the past user interfaces were not important, but this time it is important. I want to create a windows form app that has a great interface, like a beautiful website.
shown one example below
Can I achieve this by any means in visual studio 2010? I don't have any experience of WPF, is it achievable there?
Yes, you can do this and much more in WPF (consider nice animations when you mouse-over or click items, or when tab changes, etc). Do not even try winforms, there are paid libraries, which can provide you with components to create rich user interface, but winforms is not flexible in any way by itself. In wpf you can achieve EXACTLY look you want.
Specifically to screenshot:
On top is some ItemsControl with items (DataTemplate) what has restyled checkbox (or vector graphics) and background bound to current item.
Below is ContentControl, which takes data template for current item (UserControl).
Actual content is simple restyled standard controls, it's very easy to make them looks like this.
Windows Forms is a legacy technology and does not provide you good tools to create your good looking custom controls. You need to work with low level API's to draw your controls like GDI+. If you are eager to learn, it is not that hard. It is indeed fun to work with GDI+ drawing shapes and painting them etc, but it will cost you a lot of time and it probably won't look too good.
Other than that if you want to stick with Windows Forms but develop your UI quickly, you can use DevExpress or Telerik libraries but they cost a lot of money.
As Sinatr said, the most common way is to go with WPF. You will access powerful tools like Blend and a modern API to create and customize your set of controls. You can still utilize DevExpress and Telerik control in WPF.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I just got a project in which i need to create a windows explorer type application. I need to include various folders , Folders/Documents inside folders. And whatever folder/Document you select from left side, result will be shown in the right side panel.
As i am new to this all i don't know what to do and how to do. I have searched many sites but din't get any proper solution. So finally i am asking my question here. Please can you suggest how do i perform this using ASP.net with C#.
P.S. The application which is currently shown in image is a windows based application. And is developed in DevExpress.
There is no definitive answer to this, and I don't pretend to give one.
Keep in mind that making a clone of Windows Explorer is a daunting task. Instead the objective should be to create an application that anybody familiar with Windows Explorer can pick and use. Although, you need to start at the desired output, and see what is it you really need from this application - because not every feature will be viable.
Are you trying to make a virtual file manager? that looks like Windows Explorer? Then look for izwebfilemanager and look no futher. They have dedicate a good amount of time on that task.
Note: their online demo is long down - but get an screenshot:
If that is not what you are looking for, instead you want that appearance but provide a completely different functionality then, I think the real problem lies in the UI... you got to build it HTML + CSS + JavaScript.
Let's look at is that tree/list view at that left... I did look for some implementations...
This one in particular looks promising: BlueShoes TreeView
for something closer to our dear .NET you can try DevExpress Tree List (yet I think it is paid)
and also check 10 Javascript & CSS TreeView and Sitemap Plugins and Tutorials for a other alternatives.
I have been unable to find an already made solution for the icons area of the right, yet I am sure it can be done.
You will have to break down "Windows Explorer look and feel" to more specific requirements, I suggest to make a minimal version as an experiment to see what user actually would be doing with your app. Do you need multiple selection? Do you need drag and drop? etc...
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I want to build the Pentomino game in C#/XAML for Windows 8(8.1). I need field and draggable figures.
How I can do it? For draggable I'm using ManipulationDelta property, but how do I know that the figure is in the field and how do I attach it (figure in field)?
As your question stands, it's too broad.
For future reference, you should try splitting your problem into smaller problems, and asking seprate questions for each of them after doing some home research first.
Also, sharing some code about what you've tried can get more people to help you.
Having said that, I've never worked with XAML, though I've worked with C# for some time now.
About your problems:
For pentomino you will need a board. using Grid or DataGridView sounds like a good approch to me.
For representing your figures, your grid can be queried to find out if your figure can be droped on a certain square. Prepare for writing some for loops.
Abput drag'n drop, here are some links that you may find useful:
XAML GridView to GridView Drag and Drop Mouse vs Touch
Dropping an item on an UserControl item in GridView doesnt trigger Drop event (includes sample project)
How do I drag an element in Windows 8 XAML app?
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
All programs that I develop utilize the default Windows Design template:
Besides from changing the colors of the form, basically every program I write has this layout. I'm wondering how people create more custom GUI's. I tried looking it up on google but I clearly don't know how to phrase it to search. When I say custom GUI's I mean things like:
I assume it comes down to customizing what loads, but I don't know where to look, or what to research.
you should check out WPF. it frees you from the standard windows form
Your app 10 years from now:
Easily implemented in Winforms btw. FormBorderStyle is None, the Region and BackgroundImage properties and some judicious OnPaint() code.
try one of the following:
DotNetBar
Elegant UI
DevExpress
Take a look at Metro Framework. It is free, open source and famous one. I have recently used it and found it is very attractive. You can also find screenshots of the gui and code examples on the above mention link.
If it really must be a native desktop app then use WPF.. otherwise, with the rise of HTML5 and the mobile device, i can't see any reason not to build cross-platform web apps.
For WinForms, most of the custom controls can be created by overriding the OnPaint method of a control and performing your own custom painting.
You could also use WPF, and create your own themes and styles
Or you could download a 3rd-party control such as the ones mentioned by johntotetwoo.
I highly recommend you to use WPF instead, if it is possible for you to use Expression Blend, i highly suggest using Expression Blend for Designing UI(s), Storyboards(animations) and customizing UI(s) then you feel like you are walking in heaven :)
Then i suggest you to use templates or themes for WPF. Like zune theme, and if you are interested in Microsoft Office themes, the good news for you is there is an overflowing of themes like this, just google it!
but is suggest you to design your own controls if you are able to use Blend except for those situations that you see you can not do this really.