I am working with WPF in VS 2012 with C# utilizing the MVVM paradigm. So when I found this article
Custom popup and windows in WPF the MVVM way I was very excited and have used it extensively.
I create my applications using the ApplicationView to load up my different view models each of which is a user control. So Each user control has a button on the left and each operates independently.
My problem comes in when using the Custom popup as describe in the article above. The popup works fine when I am in one user control. Then when I click on the button to go to the other user control and do whatever over there and then come back to the previous view the popup no longer works.
I have stepped through the code and done everything I can think of including modifying the custom popup window dll. But with no luck. I am sure many people have used this control because it is really a great control.
Hopefully enough people out there have used this control and design their apps in a similar fashion so as to understand what I am describing.
My application view looks like so
<Window x:Class="PremierCareFinance.ApplicationView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:PremierCareFinance"
xmlns:cancelled="clr-namespace:PremierCareFinance.CancelledOrders"
xmlns:wpfx="http://schemas.xceed.com/wpf/xaml/toolkit"
Title="Premier Care Finance" Height="800" Width="1280" Icon="finance.ico">
<Window.Resources>
<DataTemplate DataType="{x:Type local:HomeViewModel}">
<local:HomeView />
</DataTemplate>
<DataTemplate DataType="{x:Type local:CustomerViewModel}">
<local:CustomerView />
</DataTemplate>
<DataTemplate DataType="{x:Type cancelled:CancelledOrderViewModel}">
<cancelled:CancelledOrderView />
</DataTemplate>
</Window.Resources>
<Grid>
<DockPanel>
<Border DockPanel.Dock="Left" BorderBrush="Black" BorderThickness="0,0,1,0">
<ItemsControl ItemsSource="{Binding PageViewModels}" >
<ItemsControl.ItemTemplate>
<DataTemplate >
<Button Content="{Binding Name}"
Command="{Binding DataContext.ChangePageCommand, RelativeSource={RelativeSource AncestorType={x:Type Window}}}"
CommandParameter="{Binding }" Margin="2,5"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Border>
<ContentControl Content="{Binding CurrentPageViewModel}" />
</DockPanel>
</Grid>
</Window>
Then all of my views are UserControls and I utilize tabs quite a bit.
Any help is appreciated