How to style the Paper Input to a normal input box? - polymer-1.0

Can anyone please help me to style the default element to a normal input box? The default polymer element is having an underline. I want to style it to a normal text box (input box). I will be thankful if you are showing with a small example too.
Thanks in advance..

The Paper Elements are most useful when you are using Material Design. If you're not using Material Design but want the functionality of Paper Elements, then your best bet is to use iron-input since that is intended to be used on a normal input box that you can apply your own styles to.
If you take a look at the code for paper-input, you'll see that iron-input and iron-form-element-behavior are actually what gives it most of its functionality (there are some paper behaviors in there as well).

Related

Trouble with quill font sizes

I am using quill js and making a fully responsive editor that will scale font-size with the container, using the view width property.
I have it fully built except for one problem:
Even though I am using prepareFormat(), (for times where the cursor is at one point and no other text is selected) the font-size will change on occasion to the highest default font inside of the quill minified file, which in version 0.20.1, happens to be 48px. I have tried putting my own numbers into the quilljs FONT_SIZES object, but only sometimes it would select them properly.
The thing I am most confused about is that if i highlight them, the letters will change to exactly what I would like them to be, whereas for the prepareFormat() fails to change it into any number but a preset in FONT_SIZES.
If anyone has a good idea as to what event I should tie prepareFormat() to, please let me know :)
Thanks in advanced!
Quill 0.20.1 uses execCommand which only allows 1-7 as valid font sizes. Quill 1.0 has no such limitation.

AngularJS Dynamic Slider Control

I am working on a project that requires a slider control that corresponds to an image and or a multitude of div objects. The spacing of the slider is irregular (the steps could be [1,4,7,13,14,16...]). Also the steps will correspond to specific spots on an image and or to a specific div object. The perfect slider would be dynamic and re-size with the screen but that may be actually impossible.
The hard part is that I am unable to use JQueryUI, instead I am limited to using controls that work with AngularJS.
I have been looking for hours and cannot find anything that would be a good starting point. So my question is whether anyone has found a good slider control to use with AngularJS?
This one fits some of your criteria
angularjs-slider

Select Box in IE7 (UI)

I observed that in IE7, the select box's drop down looks incomplete (see image 1).
But when you hover it, the drop down box show-up completely (see image 2).
How can i make it look like image 2 as default. Also, if i increase the size of select box (height: 25px) and the text size is only 9px, how can i ensure that the text is in the middle? I've tried adjusting the padding and margin of the select box with no avail.
Thank you.
That's what drop-down boxes look like when you have the Windows Aero theme enabled. It's totally normal and standard. In fact, it's what Windows users expect to see. I don't recommend changing it just because you think it looks weird. Your users won't think so. All the other webpages they look at, as well as all of the apps on their computer, work exactly the same way.
And no, you can't trivially change the appearance. You'll have to write custom styling for the entire drop-down box control. And that's pretty difficult to do in Internet Explorer compared to other browsers, if it's even possible to get it to work correctly at all.
As for your second question: why would you be increasing the height of the drop-down box? The default height is the one you want. It automatically sizes itself to fit the size of the text it displays. It doesn't need to be any bigger than that, and if you force it to be bigger, it'll look ugly like you said.
Read more this issue fixing click here,
and yet more examples demo page

Silverlight 4: how to highlight control on mouse over

My aim is to get fine control "animation" when it is mouse-over-ed. For example, I have a "map" of controls (game map that represent different type of terrain), each of them is an image with trees/rocks/hills on the green grass or water (lake or see) image of blue/cyan color. When user point any image with mouse it should get shiny: either get more bright background or get a shiny border.
It is hard to say what exactly I want to have (either background change or border), I would like to try each of them and see what is the most appropriate for me.
I am going to have a custom control (MapTile) that will represent a map tile. I know how to catch MouseEnter/MouseLeave events, but not sure how to change control style and if it is a good idea to work with control style in CodeBehind, probably there are better XAML-based solutions.
Could you please help with a solution that provide few goals:
Goal1: Add highlighted border around the control (it will be squares/rectangles, or circles; use what is easier) on mouse enter, remove border on move leave;
Goal2: Change some properties of my CustomControl (for example, background color).
Thank you very much!
1. How to han
You might find it easiest to get hold of Expression Blend and use it to create a custom template for your control.
The Learn Expression Blend page would be a good place to start. Look for tutorials on customising buttons and this is the same sort of thing that you want to do.
You need to use an attached behavior on your control. You don't need to learn Blend for this.
Check this one as an example, but you can search the site for Mouse Over for other examples.
http://gallery.expression.microsoft.com/en-us/MouseOver3D

Display percentage on piechart in WPF

Hii
Can anyone tell me how can I show percentage on the piechart....
The percentage is seen on mouseover event but I dont know how to show
the percentage on the piechart's slices....
If you are looking to put labels on the chart itself (instead of tooltip), take a look at this great blog post by WPF guru Bea Stollnitz.
It shows how to do this, in many different modes, and explains not only how, but why.
Take a look at amCharts Bundle for WPF. Pie chart supports labels on the slices, outside connected labels and includes an algorithm to prevent label overlapping.
I've just followed this tutorial (just to make sure) and I get the percentages of each slice as tooltip on mouse over by default.
If you post your code we might be able to spot if there's a problem with it.
You can use labelFunction in mx:PieSeries, and lableFunction look like that
private function pieSeries_labelFunc(item:Object, field:String, index:Number, percentValue:Number):String
{
return StringUtil.substitute("{0} ({1}%)",item.description,percentValue.toFixed(1));
}
Where description is the label that you want to see.
feel free to ask any question.

Resources