﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - ClientUI - Problem with VB popup in Silverlight MVVM</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Problem-with-VB-popup-in-Silverlight-MVVM/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Problem with VB popup in Silverlight MVVM</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Problem-with-VB-popup-in-Silverlight-MVVM/</link><pubDate>Mon, 18 Oct 2010 02:14:59 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;Do you mind providing a sample of your scenario? Testing the issue in a simple scenario to show UXDialogBox object using DialogBoxServiceProvider, I could not procude any error. Here is the snippet:&lt;/p&gt;&lt;pre&gt;    Private Sub UXPage_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded&lt;br /&gt;        DialogBoxServiceProvider.Show(New UXDialogBox1(), Nothing)&lt;br /&gt;    End Sub&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Problem with VB popup in Silverlight MVVM</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Problem-with-VB-popup-in-Silverlight-MVVM/</link><pubDate>Fri, 15 Oct 2010 09:21:47 GMT</pubDate><dc:creator>zen8019</dc:creator><description>&lt;p /&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;Hi&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;need help trying to pop up dialog box (VB) - error in method below (taken from DialogBoxServiceProvider)&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; " /&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;Public Shared Sub Show(ByVal modalWindow As IModalWindow, ByVal resultCallback As Action(Of DialogResult))&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;           Dim element As FrameworkElement = DirectCast(ISFocusManager.GetFocusedElement(), FrameworkElement)&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;            Dim owner As IWindow = Nothing&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;            If Not IsNothing(element) Then&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;                Dim logicalContainer As DependencyObject = ISFocusManager.GetLogicalContainerScope(element)&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;                If (TypeOf logicalContainer Is IWindow) Then&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;                    owner = DirectCast(logicalContainer, IWindow)&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;                End If&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;            End If&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;            modalWindow.ShowDialog(owner, resultCallback)&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;        End Sub&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;I get an error that 'owner' is nothing on this line below (which it is)....&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;modalWindow.ShowDialog(owner, resultCallback)&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;But in c# sample code below (MVVM example) does not cause the same error..&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt; IWindow owner = null;&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;Any ideas, thanks&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;Richard&lt;/p&gt;
&lt;/div&gt;
&lt;p /&gt;</description></item></channel></rss>