Custom UserControl Class indicated at other project file RRS feed

  • Question

  • hey there, Microsoft
    by default when creating a UserControl - it are presented with a default code page

    -- UserControl1.xaml.vb

    there are a different logic path being thought and the requirement is to  have the xaml control class happening in other file MyFile.vb

    -- default attached file class --
    -- wondering requirements --
    the issue is that the UserControl are not rendered - the result in window is only the namespace text show "MyFileNamespace.UserControl1";
    and so instead the control are not displayed;

    EDIT:: the happening are not very clear on what is going on, since the default attached file where filled with only a empty UserControl1 class which had being created at the custom path;

    EDIT2:: just like when searching for Local Functions, Visual Basic goes with wild names like Lambda Expressions, thus perhaps to figure out something alike is to be known to proper indicating the Custom Path for the UserControl Class by some weird name;

    Thursday, August 1, 2019 8:12 PM

All replies

  • There is a special forum for XAML programming (WPF)


    Friday, August 2, 2019 1:29 AM
  • Hi,

    1.Import a local namespace in XAML:

    <Window x:Class="WpfApp1.MainWindow"
            Title="MainWindow" Height="450" Width="800">
            <local:UserControl1 ></local:UserControl1>

    2.Import third-party namespaces in XAML

    <Window x:Class="WpfApp1.MainWindow" 
            Title="MainWindow" Height="450" Width="800">
            <myToolTip:UserControl1 ></myToolTip:UserControl1>

    Best Regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Tuesday, August 6, 2019 3:11 AM