WPF Xaml control converted to an image has incorrect layout

后端 未结 1 1608
后悔当初
后悔当初 2021-01-25 21:25

I have a control that I am converting to an image using the method here :

Force rendering of a WPF control in memory

Unfortunately I have a complex layout and it

1条回答
  •  北海茫月
    2021-01-25 22:01

    In the end I had to use a trigger to set the height to zero instead of applying Collapsed to the elements. Of course this means any margins must be converted to padding, with nested panels if needed.

    In this instance I had a border control - so I had to remove the Visibility property and use this trigger instead.

        
            
                
            
        
    

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