XAML UserControl inheritance

前端 未结 2 1005
不思量自难忘°
不思量自难忘° 2020-12-07 15:01

Coming from Java, I\'m really used to a common practice when it comes to make GUI components: I usually do some sort of base class which contains all the common objects for

2条回答
  •  青春惊慌失措
    2020-12-07 15:48

    As far as I know, deriving UI as is, is unavailable unless for resources XAML (styles for ex). Maybe the reason is the UI manager cannot guess where to put the extended XAML code: Imagine the base UI as follows:

     
     
      
     
    
    

    and the derived UI :

     
     
      

    What would be the result after the mix?

    a straight forward answer could be:

       
        
         
        
        
         

    which is not possible.

    What about controls embedding/compatibility issues ?

提交回复
热议问题