Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove a style?

Tags:

styles

wpf

themes

Let's say we define button style in .Resource tags. The style is apply to all button (TargetTye=Button, x:Key is not set). In some parts of my application, I want to turn this style off.

I seek for a solution where a "style undo" feature can happen. Like typing in MS Word, when you try some formation (bold/underline) - should read as applying a style - and later you undo it to return to initial state.

How can I do it?

[Edit]

My question is similar to the one here How to invoke windows theme in WPF? - Stack Overflow where the invoked theme is the currently-selected theme of the Windows OS.

like image 774
Nam G VU Avatar asked Oct 13 '10 04:10

Nam G VU


People also ask

How do I remove unwanted styles in Word?

Method 1: Delete a few styles manually right-click on the style you want to delete, then select Delete <style name>.

How do you delete a style paragraph?

In the Paragraph Styles menu, move the pointer over the name of the style you want to delete, then click the arrow that appears and choose Delete Style.

How do I remove styles in Word but keep formatting?

CTRL-SPACE removes character-level formatting from the selected text (fonts, italics/bold, font size, etc.) but leaves paragraph formatting (indents, line spacing, etc.) intact. CTRL-Q leaves fonts and other character formatting intact but reverts paragraph-level formatting to Normal Style of current document.


1 Answers

just give like this

Style={x:Null}

<Button Style="{x:Null}" Content="Show"/>
like image 83
Kishore Kumar Avatar answered Oct 21 '22 17:10

Kishore Kumar