© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
61 replies
linuscoro

✅ Problems adding usercontrol

I'm trying to add a usercontrol to a window.

In the window I added the local reference liek this:
cs xmlns:local="clr-namespace:PrototipServer.Controls"
cs xmlns:local="clr-namespace:PrototipServer.Controls"
`
And i have use it like this:
cs         <local:DataGridAlarmes x:Name="gd_Alarmes" estacioSeleccionada="gd_AlarmesSelectionChanged" Visibility="Hidden"  HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,5,10,5" Grid.Column="2"  Grid.Row="2"/>
cs         <local:DataGridAlarmes x:Name="gd_Alarmes" estacioSeleccionada="gd_AlarmesSelectionChanged" Visibility="Hidden"  HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,5,10,5" Grid.Column="2"  Grid.Row="2"/>

My usercontrol is inside a folder called controls inside the project.
Does anyone know why it's not working?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ DataContext & UserControl
C#CC# / help
3y ago
UserControl problem
C#CC# / help
3y ago
help w homework (usercontrol)
C#CC# / help
5mo ago
✅ help w homework (usercontrol)
C#CC# / help
5mo ago
Next page