Psd slice and creazing new design in atk4 - atk4

What is the best way to create totally new design for my atk4 application. I have psd files, but i'm not sure if I convert psd to html grid system or some other, what are the best practices?
Also, when i have html, what and how i implement html in atk4, so that atk4 is still upgradable?
thanks, Peter

There are two ways to go:
1) you create your own html/css, based on your psd templates. move that under templates/default/ int o shared.html and in css/img as necessary. add also js_include and other tags that are required to bootup jui interface for atk4
2) alternatively, especially if you plan to use atk4.3, you can setup all your layout using views, boxes and styles that are available out of the box, only adding custom assets and finetuning the color layout using less builder. New css capabilities can be seen here: http://css.agiletoolkit.org
Normally, we stick to (2) for intranet solutions or where minor design tweaks are required. If your layout is very custom, go with (1), as it gives you full freedom.

Related

AngularJS 1 approach for "new foobar" UI overlay

I'm using AngularJS 1 with angular-material and ui-router.
Does anyone know what the best practice is for providing a UI for some "new foobar" type thing? In other words, let’s say I have a ui.route putting me at /app/#/foobars/ which shows a list of all the foobars. At the bottom right is a FAB with a big plus sign, which will bring up a new UI something to allow the user to specify how they want their foobar. What is the best practices for this "UI something" that comes up, using Angular?
Should I use an angular-material dialog? (That’s my first inclination, but it seems old-fashioned.)
Do I create a route to /app/#/new-foobar/ and just bring up another UI? (This seems heavy-handed; I don’t want to change the URI, plus I probably want to get back to where I came from after creating the foobar.)
I think that ui-router allows nested states; is this something I would use? But I don't want the new view/component to be embedded in the current view --- I would expect a card or something to somehow "overlay" whatever view is showing.
I wouldn't use nested states for this, as they are intended for things such a master/detail navigation.
The answer to your question is "it depends", as many situations in programming there're always some tradeoffs you must consider. Depending if you're targeting a desktop or a mobile app you'll have more or less space to put these options on the screen. If there're a lot of configuration options you should define a completly different state on wich you layout them and apply this configuration when you come back to the list. If there are not too much of them or you want to keep them visible at the same time as the list, you can go with a SideNav panel that can be locked open depending on the resolution. An alternative I've used sometimes is using a subheader to show some controls, as you can make it "stick" below the header or let it go if you scroll the list. As I told you before is a matter of choices and tradeoffs, and some sense of usability and simplicity towards the final user. There's no silver bullet nor best practice, just follow your intuition. Good luck!

Is there a premade color palette in WPF

I am currently creating a basic text editor that has basic functions such as changing fonts and sizes.
I am currently trying to add color changing capibilities and I was wondering if there was any premade color pallettes already in the default libraries. I have looked around and have found that i can download premade palettes but i want to just stick to the default stuff.
If theres not a way my backup plan is just to load colour names into a combo box.
Also I am coding using .WPF and adding my items through the XAML with methods in C# classes.
Any comments or suggestions are appreciated.
Thanks!
A 'palette' suggests two things: a control to select and/or mix a color or a collection of colors that go together nicely.
For the first: http://www.google.nl/search?q=wpf+color+picker there a lots to pick from.
For matching colors have a look at http://kuler.adobe.com/ it allows you to create a set or copy an existing matching set of colors.
There is System.Windows.Media.Colors which is a set of well known colors.
See this StackOverflow answer for an example of how to load those into a combobox:

Drupal 7 Theming individual pages

I'm starting a Drupal 7 site and have noticed that almost every page will require a separate layout.
in order to style an individual node do i just name a template mode-NID-page.tpl.php or is there more to it?
I think i will also need to add gallery widgets, etc.. but i think that's a separate matter. But would this involve displaying fields in the above template?
First off: I don't think it's a good idea to theme pages based on their NID.
That aside, here are two possibilities how you can achieve something like this:
Theme the normal node template, but include some logic there. You could for example include specific template files based on the NID. Not a clean separation of course, as such code should not go into templates. For a cleaner separation you could attach a custom field to the pages that holds the template file used for themeing.
As you want to create individual styles for different NIDs I assume that the number of those is not exorbitantly large. In that case, you could create separate content types. Each of the NIDs should then be converted into a node of that content type and of course each content type can have its own theme template then.
Downside of the second approach is that there might be some work involved if you have a lot of settings that would need to be transferred to the content types (e.g., permissions). But then again, the new pages will be nodes too, so most things should just work out of the box as they did before.

WPF - Managing styles and avoiding messy resource dictionaries

I've spent hours working on an application design in WPF and created a whole bunch of different styles along the way. But I noticed that I actually had just edited the styles in the SimpleStyles.xaml file and not a custom dictionary.
So, I started right clicking all controls I could find and selected "edit a copy" and created a copy in a custom resource dictionary. But then I found that alot of the controls are based on several styles. SimpleScrollViewer e.g contains both the thumb and probably more. This created a huge mess in the overall structure of styles in the entire project.
And thus, my question is as follows;
What should I think about when doing this project from scratch again?
Is it best to edit a copy of the SimpleStyles controls? Is there a tool of some sort to manage stuff like this?
Expression Blend will add a resource dictionary for the Simple Styles the first time you use a SimpleStyled control. For real world projects it is best practice to separate resource dictionaries by resource type and then functional area.
For example you will have horizontal resource dictionaries that fall into the following categories:
Brushes
Control Styles
Converters / Selectors
Since these are horizontal their filenames are pretty self-explanatory (e.g. Brushes.xaml, ControlStyles.xaml, Converters.xaml, etc.)
If you are using Silverlight you should probably think about using Themes. In which case you would create Brushes.xaml and ControlStyles.xaml for each [themeName]\generic.xaml you create.
Then you should create resource dictionaries for functional areas that will house the following things:
Item Templates for various ItemsControls used.
Content Templates for various ContentControls used.
One off Control Styles
Each functional area would have a resource dictionary that had the above items (e.g. CustomerManagementStyles.xaml, Orderingstyles.xaml, etc.)

CombinedGeometry/Geometry.Combine() equivalent in Silverlight

Geometry class in WPF contains a Combine() method which is extremely useful when you need to exclude one geometry from the other, etc. Silverlight version of Geometry doesn't have such a method. The same goes for CombinedGeometry class which does the same.
Are there any other options to exclude one geometry from another in Silverlight?
I'm working on a WPF app which builds user-defined masks using Combine. If there's no answer in SL 4 (none I can see) then my fallback is to send the raw geometry back to the server for combination
I may be very late to answer this question ;-) there is an option called GeometryGroup. You may use this to exclude one geometry from other in Silverlight. You are required to set FillRule="EvenOdd".

Resources