'Style' type does not have a public TypeConverter class.

Hi

I am creating an application in wpf using vb.net. I have created a button in XAML

<Button Style="ButtonStyle"></Button>

ButtonStyle -

<Style x:Key="ButtonClass" TargetType="{x:Type Button}">
            <Setter Property="Content" Value="Test"></Setter>
</Style>

but while running the program I am getting the following run time error - 'Style' type does not have a public TypeConverter class.

Am I missing something?

Regards
Karan
KaranGuptaAsked:
Who is Participating?
 
CuteBugConnect With a Mentor Commented:
You have to specify like this

<Button Style="{StaticResource ButtonStyle}"></Button>
0
All Courses

From novice to tech pro — start learning today.