Click here to Skip to main content
15,894,410 members
Home / Discussions / WPF
   

WPF

 
QuestionSilverlight 3 Released! Pin
Mark Salsbery10-Jul-09 8:56
Mark Salsbery10-Jul-09 8:56 
AnswerRe: Silverlight 3 Released! Pin
Ray Cassick10-Jul-09 11:26
Ray Cassick10-Jul-09 11:26 
GeneralRe: Silverlight 3 Released! Pin
Kevin McFarlane11-Jul-09 0:45
Kevin McFarlane11-Jul-09 0:45 
GeneralRe: Silverlight 3 Released! Pin
Ray Cassick11-Jul-09 3:30
Ray Cassick11-Jul-09 3:30 
GeneralRe: Silverlight 3 Released! Pin
Steve Maier14-Jul-09 11:35
professionalSteve Maier14-Jul-09 11:35 
GeneralRe: Silverlight 3 Released! Pin
Kevin McFarlane14-Jul-09 12:37
Kevin McFarlane14-Jul-09 12:37 
QuestionStyle with no key name [WORK-AROUND (but I'm still interested in comments)] Pin
#realJSOP10-Jul-09 8:06
mve#realJSOP10-Jul-09 8:06 
AnswerRe: Style with no key name [WORK-AROUND (but I'm still interested in comments)] Pin
Mark Salsbery10-Jul-09 13:38
Mark Salsbery10-Jul-09 13:38 
I have a resource dictionary Dictionary1.xaml that looks like this:
<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    >
    
    <Style TargetType="Button" >
        <Setter Property="Background" Value="#FFFF0000" />
    </Style>

</ResourceDictionary>

I merge it into an app's resources in App.xaml like this:
<Application x:Class="WPFTester.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    StartupUri="Window1.xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Dictionary1.xaml" />
                <!-- Example importing resource dictionary from another assembly -->
                <!--<ResourceDictionary Source="pack://application:,,,/WpfCustomControlLibrary;component/Dictionary1.xaml" />-->
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

All the buttons in the app, unless otherwise styled, have red backgrounds.

What did you do different? Are there other styles earlier in the search order that are
overriding your app-level styles?

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

QuestionHow to convert xaml files to png and display in one page Pin
prabhkar27210-Jul-09 0:59
prabhkar27210-Jul-09 0:59 
QuestionRe: How to convert xaml files to png and display in one page Pin
Mark Salsbery10-Jul-09 6:24
Mark Salsbery10-Jul-09 6:24 
AnswerRe: How to convert xaml files to png and display in one page Pin
prabhkar27212-Jul-09 20:19
prabhkar27212-Jul-09 20:19 
GeneralRe: How to convert xaml files to png and display in one page Pin
Jeremy Likness26-Jul-09 3:22
professionalJeremy Likness26-Jul-09 3:22 
QuestionPsd file to XAML Pin
krishnan.s9-Jul-09 23:27
krishnan.s9-Jul-09 23:27 
AnswerRe: Psd file to XAML Pin
Pete O'Hanlon9-Jul-09 23:53
mvePete O'Hanlon9-Jul-09 23:53 
GeneralRe: Psd file to XAML Pin
krishnan.s10-Jul-09 0:06
krishnan.s10-Jul-09 0:06 
GeneralRe: Psd file to XAML Pin
Pete O'Hanlon10-Jul-09 0:42
mvePete O'Hanlon10-Jul-09 0:42 
QuestionManipulating a PNG palette Pin
pnart9-Jul-09 11:50
pnart9-Jul-09 11:50 
AnswerRe: Manipulating a PNG palette Pin
Mark Salsbery10-Jul-09 6:54
Mark Salsbery10-Jul-09 6:54 
GeneralRe: Manipulating a PNG palette Pin
pnart13-Jul-09 7:05
pnart13-Jul-09 7:05 
QuestionMultiple progress bars Pin
vsaratkar9-Jul-09 4:10
vsaratkar9-Jul-09 4:10 
AnswerRe: Multiple progress bars Pin
Pete O'Hanlon9-Jul-09 4:13
mvePete O'Hanlon9-Jul-09 4:13 
AnswerRe: Multiple progress bars Pin
#realJSOP9-Jul-09 4:33
mve#realJSOP9-Jul-09 4:33 
AnswerRe: Multiple progress bars Pin
vsaratkar9-Jul-09 8:53
vsaratkar9-Jul-09 8:53 
GeneralRe: Multiple progress bars Pin
#realJSOP9-Jul-09 9:32
mve#realJSOP9-Jul-09 9:32 
GeneralRe: Multiple progress bars Pin
Mark Salsbery10-Jul-09 7:04
Mark Salsbery10-Jul-09 7:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.