WPF - How to apply style to AdornedElementPlaceholder's AdornedElement?

前端 未结 1 1647
我寻月下人不归
我寻月下人不归 2021-01-19 01:13

I\'m trying to apply a style to an adorned element, but I don\'t know the correct syntax. Here is what I\'ve tried:

1条回答
  •  独厮守ぢ
    2021-01-19 02:04

    Need to put where the resource is coming from.

    
    

    Then define the style in a resource such as the user control resources:

    
      
    
    

    However I dont believe you want to set the style of the adornedelement within the placeholder. It's just a placeholder for any control with that template. You should set the style of the adornedelement in the element itself like the example I provided above. If you want to style the control based upon it's validation then something like this:

    
       
           
               !
               
           
       
       
    
    
        Age:
        
             
                 
                     
                 
             
         
    
    

    0 讨论(0)
提交回复
热议问题