Aliasing Resources (WPF)

后端 未结 2 974
旧时难觅i
旧时难觅i 2021-01-20 17:10

I am trying to alias a resource in XAML, as follows:



    

        
2条回答
  •  隐瞒了意图╮
    2021-01-20 17:58

    Try as I might, I cannot reproduce your problem. I think there is more at play than the code you have posted. This works fine for me:

    App.xaml:

    
        
            
            
        
    
    

    Window1.xaml:

    
        
    
    

    UserControl1.xaml:

    
        
            
            
        
        
    
    

    I added the Leaves.jpg image to my project and it displayed just fine.

提交回复
热议问题