Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Closing my UserControl?

$
0
0

Hi there,


From my main XAML view I am loading one Window and once loaded I'm calling one UserControl under criteria.

That's fine but I don't know how to close, at first my UserControl, and finally my Window.

What happens? Nothing at all, my Windows remains and the UserControl too...

Help me out!!

1.Calling my Window from my XAML view:

 Dim mVentanaOR As New OR_TotalManagement(1)
 mVentanaOR.WindowStartupLocation = WindowStartupLocation.CenterScreen
 If mVentanaOR.ShowDialog = True Then
 End If

2.Calling my UserControl from my Window:

 Public Sub New(soption As Short)

        InitializeComponent()
        If soption = 1 Then
            Me.Title = "Selección de vehículo"
            Me.GridGeneral.Children.Add(New SelecciondeVehiculo())

        elseif option= 2 then

3.We are now in my UserControl:

        Me.Finalize()

      Me.UserControl_Unloaded(sender, e)


I understand that from my UserControl I would have to address to the Parent. How???

Thanks for your comments,



Primary platform is Windows 7 Ultimate 64 bit along with VS 2012/Sql2k8 for WPF/SilverLight projects.


Viewing all articles
Browse latest Browse all 18858

Trending Articles


FLASHBACK WITH SIRASA FM AT GALGAMUWA 2022


Mp3 Download: Mdu - Mazola


Imitation gun was fired at motorist in Leicester road-rage incident


Ndebele names


MCKINNEY EMALINE “EMMA” OF WES...


Okra & Motia — The Workshop (Prod by Hammer)


Skint TV teen to be sentenced


Moondru Mudichu 19-09-2017 – Polimer tv Serial


YOSVANI JAMES Arrested by Miami-Dade County Corrections on Jan 10, 2017


Stories • Goddess Stepmom



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>