style

Optionally Display Image in HierarchicalDataTemplate

Hello: I have several HierarchicalDataTemplates in my TreeView. In one of them I would like to display an image to the right of the label if a property in this case HasMissingFit is true, otherwise the image should not be displayed at all. If I wanted the image to always be present I know I could do this using just an Image tag with a ...

create image style in xaml

I don't know why I'm having so much trouble doing this, it shouldn't be hard, but I must be Blend-incompetent. Can someone give me the xaml for an image style where the image is at 60% opacity, on mouseover fades in to 100, mouseout back to 60% and onclick glows for a 0,2 sec. Or just tell me how to do in blend? thank you Solution tur...

jQuery Table Zebra Striping with hidden rows

I have been using the following with no problems: $("#tableid tr:even").addClass("evenClass"); But now I have rows in my table that are hidden which messes up the zebra striping styles. I have tried add 'is(":visible")' and things like that to no avail. Any ideas? Thanks ...

Are C++ comments considered bad style in C?

I was discussing C programming styles with some students and when we were talking about comments, one of them noted that he doesn't use C++ comments in C code because they are a bad idea. Turns out that it was based on personal experience with multi-line C++ comments, but it's not the first time I've heard that claim. So, is // considere...

Question on Function Declaration

Given the two code examples which is preferred? In the first the return variable is defined as a local variable. In the second the return variable is passed by the caller. Are you allowed to define a function and return a variable that was passed to it? I's this simply a preference of one or the other? is there a performance difference? ...

Body persitant inline style in ckEditor

I'm trying all day to set up a peristant style attribute to the body tag of the ckeditor instance. I could not find something like bodyStyle in ckeditor.config api (only bodyId and bodyClass). So I was trying it myself, with the following solution (jQuery is used): $(this).find('textarea.editor').ckeditor().ckeditorGet().on( 'instanceRe...

changing tooltip in visualstatemanager

Hi, i want to be able to change the tooltip on Checked and Unchecked, i tried: <VisualState x:Name="Checked"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="ToolTipService.ToolTip" Storyboard.TargetName="btn"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjec...

Styling ContextMenu (Silverlight Toolkit Apr 2010) Using Expression Blend

Screen Shot I am trying to remove the grey background from this context menu but I can't find the property to change... All the elements of the context menu are either transparent or other colours. Is this a bug or do I have to edit more than just the ItemContainerStyle? TIA ...

override WPF styles

Hi, Looking at SharpDevelop source code I found this button declaration: <Button Style="{x:Static core:GlobalStyles.ButtonStyle}" Content="{core:Localize StartPage.StartMenu.NewCombineButton}" Click="newSolutionClick" Margin="8,0,0,0" /> my problem is the style declaration: Style="{x:Static core:GlobalStyles.ButtonStyle}" it pre...

changing tooltip based on state in silverlight

Hi, I wanted to be able to change the tooltip on checked and unchecked through the visualstatemanager, this is what i got so far but it doesn't work: <VisualState x:Name="Checked"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="ToolTipService.ToolTip" Storyboard.TargetName="btn"> <Discret...

How do you stylize tabs in TabActivity?

How does one stylize tabs (tabhost/tabwidget)? The followding doesn't seem to work: <TabHost android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TabWidget android:id="@android:id/tabs" android:layout_height="wrap_content" android:layout_width="fill_parent" style="@style/pro...

Custom WPF DatePickerTextBox Template Help

I am trying to use a custom textbox in the DatePicker control, but I can't get the date to bind from the popup calendar to the TextBox. I don't want to have to style the entire DatePicker unless I have to, and the DatePickerTextBox has its own control, so there must be a way to only alter it. The code below is what I have as a start: <S...

WPF TextBox: error setting style

Hi, I have defined style for my textboxes that would show hints about what to enter when the textbox is empty. This would be my window: <Grid> <Grid.Resources> <Style TargetType="{x:Type TextBox}" x:Key="stlHintbox"> <Style.Triggers> <DataTrigger Binding="{Binding Text, RelativeSource={RelativeS...

WPF Bind to parent property from within nested element using style

Hi, I've been trying to build a text box with a hint that's displaying while it's empty. I'm having trouble setting the hint text from within a style. To be precise, this works (that is, it binds correctly): <TextBox Tag="hint text"> <TextBox.Background> <VisualBrush Stretch="None"> <VisualBrus...

WPF/C#: Creating a button style: Text + Image

I just want to ask how should I put my image (dynamically) in this following code: <Style x:Key="ButtonStyler" TargetType="{x:Type Button}"> <Setter Property="Background"> <Setter.Value> <RadialGradientBrush> <RadialGradientBrush.GradientStops> <GradientStopCollection> ...

jQuery selector: How to select by CSS styles

I'm trying to find all the parent elements that have the CSS style display:none. I can't seem to get it to work though. Here's what I've got: var $parents = $(...).parents("[css=display:none]"); ...

How to update a part of a WPF custom style

Hi all, I have created a custom window control (inherited from Window), all is fine except the text of my status bar. I have added a new property to my control called "StatusText" and this text is shown inside a TextBlock in my control's style. But when I change the StatusText property of my window the text doesn't change, it's not upd...

Android: How to get background color of Activity in Java?

How can I get background color and text color (default for child views) of an Activity in Java? ...

LINQ or foreach - style/readability and speed

I have a piece of code for some validation logic, which in generalized for goes like this: private bool AllItemsAreSatisfactoryV1(IEnumerable<Source> collection) { foreach(var foo in collection) { Target target = SomeFancyLookup(foo); if (!target.Satisfactory) { return false; } } ...

TargetType="{x:Type GroupItem}" arrow style in wpf

How to change arrow style for ...