# Other .NET Programming > Windows Presentation Foundation (WPF) & XAML forum >  Force Refresh WPF Window

## Vinod S

Hi all, I am working with a WPF application. My application contains a re-sizable docked window and floating windows containing user controls representing different pages. Now what i want is when the user re-sizes the dock-able window width i need to reset the width of other windows and make them redraw based on the new width. How can i forcefully redraw the windows to re-arrange its controls based on the new width.

----------


## Arjay

Are you using any sort of MVP, MVC, MVVM architecture?

----------


## Vinod S

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.

----------


## 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).

----------


## 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).

----------


## Vinod S

I have added a width dependency property in the windows class and its set  with  



```
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.

----------


## Arjay

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.

----------

