How to import one ResourceDictionary into other, in WPF?

前端 未结 3 1576
醉梦人生
醉梦人生 2021-02-07 00:54

Is it possible to add one resource dictionary into other one?

3条回答
  •  北海茫月
    2021-02-07 01:30

    A snippet straight from a sketchflow project I am working on that shows how to merge resource dictionaries in xaml:

    
        
        
            
                
                
            
        
    
    

    This shows merging two additional resource dictionaries into another resource dictionary.

    (Note that the order can become important if you have default styles defined in more than one place as they will override each other)

提交回复
热议问题