Boa Tarde Galera, estou desenvolvendo um botão simples e não to conseguindo termina !
Esta dando o erro de " Invalid token '}' .... "
vou postar o codigo pra ver se vcs consseguem me ajudar. ESTA ABAIXO É A MINHA CLASSE !!!!
namespace SilverlightApplication2
{
public class MyButton : Control
{
public MyButton()
{
DefaultStyleKey = typeof(MyButton);
}
[assembly: XmlnsDefinition("http://www.google.com", "mycontrol")]
[assembly: XmlnsPrefix("http://www.google.com", "my")]
} // O ERRO ESTA DANDO AQUI !!!!!!!
}
Logo em seguida tem o meu Resource Dictionary
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mycontrol="clr-namespace:mycontrol;assembly=mycontrol">
<Style TargetType="mycontrol:MyButton">
<Setter Property="Width" Value="120" />
<Setter Property="Height" Value="30" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="mycontrol:MyButton">
<Grid>
<Rectangle HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Stroke="Black"
StrokeThickness="2" Fill="Red"
RadiusX="10" RadiusY="10" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
e tem meu codigo XAML !!!!
<Grid x:Name="LayoutRoot" Background="White">
<my:MyButton />
</Grid>
Atenciosamente.