Hi, I have a Usercontrol in a UserControl libracy (seperate assembly) i have in my xaml markup like this:
<UserControl x:Class="CenterTextTemplate.CenterTextTemplate"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Name="Test"
Height="Auto" Width="Auto">
<Grid>
<!--<TextBlock Name="TextField" Text="{Binding Text}"></TextBlock> -->
<Viewbox VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Name="TextField" Text="{Binding Text, ElementName=Test}" Foreground="Red" FontSize="50"></TextBlock>
</Viewbox>
</Grid>
In my .cs file i have a property:
public string Text { get { return "test"; } }
When i load the usercontrol i see no "test" text... is there something im missing? Tried to not give a Name to the usercontrol but that didnt work either...
EDIT: In this setup i get this error: Error 1 The type name 'CenterTextTemplate' does not exist in the type 'CenterTextTemplate.CenterTextTemplate' C:\Documents and Settings\Brian Hvarregaard\My Documents\Visual Studio 2008\Projects\GreenWeb Templates\CenterTextTemplate\CenterTextTemplate.xaml 4 37 CenterTextTemplate