I'm developing for Windows Phone 8, I've designed my application and I noticed that there is an "Assignment grid" code that can be uncommented by default on a new project.
Take a look below for the description in the file:
<!--Uncomment to see an alignment grid to help ensure your controls are
aligned on common boundaries. The image has a top margin of -32px to
account for the System Tray. Set this to 0 (or remove the margin altogether)
if the System Tray is hidden.
Before shipping remove this XAML and the image itself.-->
<!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" />-->
This is the background image that shows when it is uncommented:
I'm confused by this, why are there "common boundaries" determined by an image? Surely the boundaries are determined within the development environment, IE the borders of the phone image? Even on that image shown above, the default "My Application" text doesn't fit within the "alignment image". So they're not abiding by their own alignment rule?
What am I supposed to take from this information? By keeping everything within these boundaries I'm going to be losing half of the screen space!
Why do I have to align my controls within these boundaries, will they end up not being shown? I thought the Windows Phones have the same resolution anyway?
EDIT:
I was hoping to put a notification button and indication of the current logged in username at the very top of my application like so:
The only way that I could have these inside the grid would be if I had them drooping down quite far, it wouldn't look how I want.
Should I definitely be putting everything within the grid image, if not am I heading for trouble with my implementation?
The grids are used as guidelines to make your app look aesthetically pleasing. If your text go all the way to the edges of the screen your app will look ugly. The grids between the boxes is used for aligning elements inside your app. You don't want all your elements to be all sticking together, they will look ugly. Windows Phone development focuses greatly on design.
Hope that helped!
Song
Related
long story short,
here's my placeholder text:
<textarea id="colour" type="text" rows="9" name="message" placeholder="Hi, I'm the next star architect! Here's my work before ever studying for a RIBA1, I first got inspired into doing architecture playing Sims 4 and I instantly had to download Architecture software to build a house. My first project is my Mesuem/Art gallery and I grown massively in that first project. Please look though every project, especially the ones with the star. ... ...Also type here and hit send if you want to email me." ></textarea>
Hi=ow can I make the 'hi' part colour green or 'sims 4' part yellow without using the span tag,
is it even possible????
many thanks
didnt work.
No, it is not currently possible, and it is not best practices to use placeholder text to hold vital information. It would be much better to put your message around the input field or in a label, style as you wish, and keep placeholder text short and descriptive. Keep in mind not everyone can see your placeholder text and screen readers usually do not announce it.
If you would like more information on placeholder text and accessibility see the WCAG https://www.w3.org/WAI/tutorials/forms/instructions/#placeholder-text
I'm using FMX framework of Delphi XE6 to develop a webapp for iPad. The form looks extremely large, so that the whole form cannot be shown entirely on 24' TFT monitor. If I want to add control to the form bottom, I have to scroll down first. I found one thing very annoying.
Is it possible to scale the form to 50%? On MacOS, I can easily scale the window of the iOS simulator by pressing ⌘+1.
If you want to fit it too your screensize you schould set the align properties to Client rather then give it a size. This way it scales automaticly to your screensize. If you have more components on your form you should change all of them too align in the way you want and maybe use layouts.
I just discovered Fabric.js and though the documentation is a lacking a bit, it seems like it will handle everything I need for an HTML-based Dream Board tool I'm building. It appears that it doesn't play well with JQueryUI, though.
When I set any of my objects to be JQueryUI widgets, button, dialog box, etc...the control handles seem to be non responsive on the top half of my canvas items, and even on the bottom, the hit areas for resizing/rotating are greatly reduced, which makes the items hard to manipulate. Has anyone run into this? Is this a known issue? I checked github and have tried to search SO to no avail.
Thank you!
http://seismicdevelopment.com/test/no-jquery-uis.html - No JQuery UI Widgets...behaves how I'd expect.
http://seismicdevelopment.com/test/with-jquery-uis.html - Click 'Add Image', you'll get an image, but compared to the other page, you'll notice that the corners of the image aren't as interactive...you can move the image ok, but rotating and scaling is ver hit-or-miss.
The problem must be in offsets. jQueryUI is probably modifying height of those buttons, which moves canvas slightly down, comparing to how it was during initialization.
I explained this — and why it happens in Fabric — in more detail here.
I am trying to get a inputtext area and a submit button attached just to the right of it.
Ideally, the two together will use 100% of the width and be just side by side.
I have been trying to play around with ui-grid-a and similar options but everything fails miserably. You can see some attemps there. They are all equally ugly but the most complicated thing is to get the two elements side by side with one that has a fixed width (the button) and one that should take the rest of the width (hence neither fixed nor a percentage).
Do you have any idea how to render this properly?
In a dream world jQuery would have some built-in function to group those controls (just like <fieldset data-role="controlgroup" data-type="horizontal" data-role="fieldcontain"> for grouping checkboxes. But it does not seem so.
Thanks a lot for your help,
Mad
Hidden within jQuery Mobile's own documentation I found an approach that worked just fine for my search box + search button implementation.
In that page, they are comparing things side-by-side by using a simple <table> layout which inspired me to rely on this as well. While tables are NOT the go-to resource for doing layout/design well, it is extremely effective, simple, and circumvents many of the hassles of the workarounds I'm seeing here. Here is what my approach can do for your jsfiddle you linked. See the fourth iteration.
In other words, due to the complicated nature of how jQuery Mobile builds a page, adds in divs and styling that aren't in your markup, etc., this might be your best option for this particular scenario:
Wanting two columns of items where the second column is a fixed width.
Where the first column expands to fill the width of the screen on resize.
Where you want the elements to encompass the whole width of the device.
(Notably, if you wanted to tweak any of these particular aspects, some simple CSS padding or aligning should do the trick starting with this base solution)
<table style='width:100%'><tr>
<td>
<input type='text' (or type='search') />
</td>
<td style='font-size:80%; width:7em'>
<input type='submit' value='Submit' />
</td>
</tr></table>
Obviously, you should name and give an id to these items if you want to post them somewhere or manipulate them in javascript. Hopefully this proves helpful to someone else who is not put off by the nature of <table>s. I have been unable to see a downside to this approach using jQuery Mobile's simple interface / theming.
Lastly, you may want to stop and ask yourself if a submit button is even necessary. In mobile devices such as mobile safari, there is a button on the keyboard labeled "Go" whenever form input elements are being interacted with. This operates the same as a return key and can submit the search term. I have not vetted this option on other browsers at this time.
(This is not a solution to rival your approach to shift the icon of the search box. That is very clever but doesn't seem to be what your original question was about.)
I found a new answer for those of you that are looking at this thread.
I find it much better in terms of integration with jQuery Mobile. However, it could be vulnerable to upgrades in jQuery Mobile since it relies on how the icon image file is organized.
I simply added this CSS rule :
.ui-icon-searchfield:after {background-position: -252px !important;}
And the icon magically turns into a data-icon="check". Exactly what I was looking for! You can pick whatever icon you want by changing the offset and looking into images/icons-18-white.png for the icon mapping.
Of course you will want to refine the selector so you only target the input boxes you want to change.
Enjoy the hack.
the way I solved this problem was to float the input box next to the button, then have pagebeforeshow set the size of the input box to window width minus the size of the button.
After a fruitful discussion with adamdehaven, it turns out that:
A validate button is most of the time unnecessary and against the logic of mobile applications. It is better to use <input type="search" /> for such problems
The framework does not allow to customize the icon for type="search" content.
To make for the latter, I put together an ugly hack that you can see there. Unless you zoom in quite a lot you won't see a difference with the regular type="search" besides the darker grey. However, I suspect this solution could be vulnerable to minor changes to the framework in the future.
Another solution would be to directly pull out the icon and manually overimpose an home made icon button over the input. It should be slightly more robust (because at least the button would not be based on the framework) but requires a few quick photoshop changes to pull out the icon and put it in a propper file.
it should be simple but I don't find how to do it.
I create a form with a right aligned panel that I color in blue for example.
If I grab my forms left edge and resize it back and forth horizontally quickly, I would like the right panel not to move or flicker. As its position is unchanged, there is no reason why it should not stay completely steady. Does anybody know a simple trick to solve this apparently simple problem?
Thanks
This is just a fact of life with Windows GUI apps. You can see the same effect in a WinForms app and indeed even in mainstream Windows apps. For example, open an Explorer window and do exactly the same operation, resize by grabbing the left hand edge of the window. You will see exactly the same effect. You can see the same effect by resizing from any edge. Word and Excel behave in the same way.
My guess is that Windows repaints in the sizing loop before it sends the resizing message that allows the app to realign its controls.