Re: Force Refresh WPF Window
Are you using any sort of MVP, MVC, MVVM architecture?
Re: Force Refresh WPF Window
Yes we are following the MVP pattern. We are getting the event to redraw the floating windows and there we are calling the InvalidateVisual function of the window. But the window did not getting refreshed nor its OnRender override getting called.
Re: Force Refresh WPF Window
Are you exposing any size or resize dependency properties? If the controls already expose resize dependency properties, are you coercing them?
In other words all controls that need to resize need to be connected up to the VM (in the mvvm pattern). One control initiates the resize, and the VM passes the appropriate values to via a dependencie prop to resize itself (or it's child controls).
Re: Force Refresh WPF Window
Quote:
Originally Posted by
Arjay
Are you exposing any size or resize dependency properties? If the controls already expose resize dependency properties, are you coercing them?
In other words all controls that need to resize need to be connected up to the VM (in the mvvm pattern). One control initiates the resize, and the VM passes the appropriate values to via a dependencie prop to resize itself (or it's child controls).
I might be misunderstanding the problem, but it doesn't seem like a 'refresh' problem per se - it seems more like the initiating control isn't passing the resize to the VM and/or the controls connected to the VM aren't responding (or don't have the wiring to do so).
Re: Force Refresh WPF Window
I have added a width dependency property in the windows class and its set with
Code:
System.Windows.FrameworkPropertyMetadataOptions.AffectsRender | System.Windows.FrameworkPropertyMetadataOptions.AffectsArrange
But and then from the main window where i get the width change event of docked windows i will set the new width to with dependency property of all windows. but its not making the window get adjusted or redraw with the new width. what can i do in this.
Re: Force Refresh WPF Window
There's not much I can tell you other than set some breakpoints and step through the code to figure out what is getting called or not getting called or if a component is not reacting to a size change. There's little more I can to to offer from the one line of code you've shown.
If you can create a sample project that shows the issue, zip it up and attached it here, I would be glad to take another look at it.