My aim is load an User Control in my view under user criteria selection.
My View:
<Window x:Class="OR_Management" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="OR_Management" Height="300" Width="300" KeyDown="Window_KeyDown" xmlns:local="clr-namespace:GIT_CuadroMando"><Window.Resources><ResourceDictionary><ResourceDictionary.MergedDictionaries><ResourceDictionary Source="/Assets/Styles.xaml"/></ResourceDictionary.MergedDictionaries></ResourceDictionary></Window.Resources><Grid><Grid.Background><LinearGradientBrush EndPoint="0.985,0.415" StartPoint="0.053,0.415"><GradientStop Color="#FF99B4D1" Offset="0"/><GradientStop Color="White" Offset="1"/></LinearGradientBrush></Grid.Background><local:SelecciondeVehiculo></local:SelecciondeVehiculo></Grid></Window>
Where
<local:SelecciondeVehiculo></local:VehicleSelection> => VehicleSelection.xaml
<local:UsersImplied></local:UsersImplied> => UsuImplied.xaml
<local:ExpertActions></local:Exper.tActions> => ExpertAC.xaml
..
..
Code-behind:
Dim mVentanaOR As New Or_Management(1)
If mVentanaOR.ShowDialog = True Then
End If
OR_Management.XAML:
Public Class OR_Management Public Sub New(soption As Short) ' Llamada necesaria para el diseñador. InitializeComponent() If soption = 1 Then ''' JUST ASSIGN THE USER CONTROL NEEDED
' VehicleSelection.xaml,UsuImplied.xaml, and so on
End If End Sub
Primary platform is Windows 7 Ultimate 64 bit along with VS 2012/Sql2k8 for WPF/SilverLight projects.