style

My style/control template out my calendar's blackout dates.

Howdy, My C#/WPF project needs a calendar. We're going to be using it to pick a range of dates for appointment scheduling. I'm told the default calendar is too small to be used by some of our reps so I've been working on resizing it. <toolkit:Calendar Grid.Row="1" x:Name="DateWindowCalendar" BorderBrush="White" BorderThickness="0" ...

How can I programmatically copy all of the style attributes from one DOM element to another

I have a page with two frames, and I need to (via javascript) copy an element and all of its nested elements (it's a ul/li tree) and most importantly it's style from one frame to the other. I get all the content via assigning innerhtml, and I am able to position the new element in the second frame with dest.style.left and dest.style.top...

How can I apply a theme/style to an Action android

In Android, how can I apply a style to an API action? I am using the RingtoneManager.RINGTON_PICKER action to let the user select an alarm, and would like to apply the standard theme that the other child-activities use. Does anyone know how I can apply a theme? The code I'm using to open the RINGTONE_PICKER is Intent intent = new Inte...

Does CSS have a "start over" feature?

I'm using calendar_date_select (henceforth CDS) in a Rails application, and have a stupid question. When I embed the CDS component in the middle of an already-CSS-styled page, all manner of things go ugly-wrong with it (spacing, fonts, etc.). Clearly the elements inside the CDS have inherited unwanted stuff from the styles already workin...

Overlap problem with Android ListView selector

I am trying to style my ListView with two 9-patch background images (16px * 9px), one dark image for default state and another green image for selected and pressed state. It works except for just one problem that when I select or press one list item, it seems that the selected item overlap the next one a little bit as I can see some pi...

position div center horizontal and vertical

i would like to center a popup div how can i do that browser friendly???? this is the original a bit to the left. <div class="popLayerWrapper"> <div id="addBookmarksLayer" class="popLayer" style="left:260px; padding:30px;"> <div class="closeLayer" >close</div> <div class="layerContent"></div> </div> </div> ...

Python indentation in "empty lines"

Which is preferred ("." indicating whitespace)? A) def foo(): x = 1 y = 2 .... if True: bar() B) def foo(): x = 1 y = 2 if True: bar() My intuition would be B (that's also what vim does for me), but I see people using A) all the time. Is it just because most of the editors out there are bro...

Is there a common color file including all common colors for Android application development?

It is a common thing to add a color name and a color RGB value in a config xml file for developing an Android application. It is boring sometimes for example, when I want to add color pink, I had to find some tool to show me what the exact RGB value for it and then fill it in that xml file. I am wondering is there any predefined color f...

wpf keep base style in custom control

Hello, I have created a custom button as i wanted an image and a text inside it as follows: <Style TargetType="{x:Type Local:ImageButton}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Local:ImageButton}"> <StackPanel Height="Auto" Orientation="Horizontal"...

Custom button template in WPF

I want to create a simple button template with an image and text inside it. But I want to keep the System button's look and feel. How do I create it, step by step? P.S.: I have already tried it with CustomControl in WPF and BasedOn property. ...

WPF - Which one is better? Style or User Control?

I wanted to know which one amongst Style and UserControl would be better to use in WPF? For example: I have created an image button in two different ways. One uses Style and ContentTemplate property is set. It uses one other class with dependency properties. The other way is I have created a UserControl which has a button and its cont...

WPF global styles problem with .Net4

I have just changed my WPF application from .Net3.5 to .Net4. Doing this caused all my global styles to stop working. Only the styles explicitly set using a key did work. I've done some research and figured out what causes this, and reproduced it in a simple app. I have a simple WPF app containing only a button with text - no style or ...

Defining a ContextMenu in a DataGridRow style

I'm trying to clean up some of my xaml in my views by moving a lot of the DataGrid styles into a ResourceDictionary. One of the things I'd like to move is the ContextMenu that is bound to some commands in the ViewModel. However, when I move the context menu to the ResourceDictionary, the commands are are never firing anymore, and I can...

GridView Style based on bound data.

I would like the rows of my GridView to have strikethrough based on a bound data value called IsObsolete. I tried to do this: <RowStyle BackColor="#EFF3FB" Font-Strikeout='<%# Bind('IsObsolete') %>' /> But obviously this doesn't parse. I'd rather not do this in GridView.DataBound(). Any other ideas? ...

Styling VB.net Form With CSS & HTML?

Hello, I am wondering if it is possible to style my VB.net application with CSS and HTML. So far all I can do is apply a windows based theme. Any help would be really appreciated!! ...

Trouble with OpenLayers Styles.

So, tired of always seeing the bright orange default regular polygons, I'm trying to learn to style OpenLayers. I've had some success with: var layer_style = OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style['default']); layer_style.fillColor = "#000000"; layer_style.strokeColor = "#000000"; polygonLayer = new OpenLaye...

The "is" in JUnit 4 assertions

Is there any semantic difference between writing assertThat(object1, is(equalTo(object2))); and writing assertThat(object1, equalTo(object2))); ? If not, I would prefer the first version, because it reads better. Are there any other considerations here? ...

how to change UIPickerView style

how to change UIPickerView style i want to user image ...

How to remove the shadow from a librarystack

I'm currently in a project where I need a LibraryStack with no visuals at all, so it would just show the content. If I just remove the background a shadow stays in view which I cant seem to remove... This code looks like: <s:LibraryStack Background="Transparent"> <s:LibraryStackItem Background="AliceBlue"/> <s:LibraryStackIte...

WPF: Change the style of a ViewBox depending upon the amount of data

Hi there, I have a WPF app that has a ViewBox to display the items in my collection, diplaying a 2-column grid for my results. What I'd like to do is, depending on the number of items in my collection, change the number of columns. E.g if there are < 10 items in the list, then show them in just 1 column; If there are 10 items in my li...