Should Silverlight 4 user controls have separate DLLs?

I am creating several custom controls for a Silverlight 4 project. I have successfully created one control and am wondering if I can define more in one project and then all the controls included in one .DLL.

Now I have standard files for the first control:

/Resources/icon.png
/themes/generic.xaml 
/CustomControl1.cs
/CustomControl1EventArgs

I think this is not possible since there can only be one "generic.xaml".

Thank,

Scott

+3
source share
1 answer

, , /themes/generic.xaml. TargetType. , generic.xaml : -

 <ResourceDictionary ... blah namespace stuff ...>

   <Style TargetType="local:CustomControl1">
     <Setter Property="Template">
       <Setter.Value>
         <ControlTemplate TargetType="local:CustomControl1">
           <!-- Template for Custom control 1 -->

          </ControlTemplate>
       </Setter.Value>
     </Setter>
   </Style>

   <Style TargetType="local:CustomControl2">
     <Setter Property="Template">
       <Setter.Value>
         <ControlTemplate TargetType="local:CustomControl2">
           <!-- Template for Custom control 2 -->

          </ControlTemplate>
       </Setter.Value>
     </Setter>
   </Style>

   <!-- and so on -->

</ResourceDictionary>

Silverlight Toolkit , . generic.xaml . , , , . , - , Mullies, ?

+3

Source: https://habr.com/ru/post/1731446/


All Articles