Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide control within a WPF User Control Library

I've a project made from the "WPF User Control Library" Template in Visual Studio. This project contains one main usercontrol plus additional Windows/Usercontrols.

How can I "hide" these additional Windows/Usercontrols, so that the user can only import the main usercontrol from the assembly (I wanted to put a screen-shot to illustrate my question but unfortunately, my "reputation" is too low!).

Thx All
Fred

like image 469
Fred Avatar asked Sep 15 '10 11:09

Fred


1 Answers

Make those controls internal. If you have classic UserControls with XAML and codebehind you will need to add x:ClassModifier="internal" to the root element in the XAML:

<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="MyNameSpace.MyUserControl"
    x:ClassModifier="internal">
       <!-- bla -->
</UserControl>
like image 57
bitbonk Avatar answered Sep 28 '22 20:09

bitbonk