D
DanThMan
I already abandoned using a UserControl because that crashes the
designer every time (though works when I run it). Now I'm having the
same problem trying to do the same thing with a ControlTemplate. I
guess (hope) all of this will be fixed when VS 2008 comes out, but
meanwhile, I struggle.
I created a ControlTemplate with a bunch of labels and a couple other
controls. I wanted all the labels in this ControlTemplate to have a
particular style, so, I built a Style with TargetType="Label" and no
x:Key (since I wanted the style to apply to *all* labels). No dice--
the designer wants an x:Key (error message: "Could not convert the
property '<key>' to a string"). As with the UserControl, works if I
run it but not in the designer.
If I add an x:Key, it will then work fine in the designer, but then I
have to manually set the style of every label to "{StaticResource
name_of_style}".
I know this is asking a lot, but it sure would be nice if I didn't
have to comment out a bunch of stuff to see my design. If you have any
helpful hints, please don't hold back.
Thx,
-Dan
designer every time (though works when I run it). Now I'm having the
same problem trying to do the same thing with a ControlTemplate. I
guess (hope) all of this will be fixed when VS 2008 comes out, but
meanwhile, I struggle.
I created a ControlTemplate with a bunch of labels and a couple other
controls. I wanted all the labels in this ControlTemplate to have a
particular style, so, I built a Style with TargetType="Label" and no
x:Key (since I wanted the style to apply to *all* labels). No dice--
the designer wants an x:Key (error message: "Could not convert the
property '<key>' to a string"). As with the UserControl, works if I
run it but not in the designer.
If I add an x:Key, it will then work fine in the designer, but then I
have to manually set the style of every label to "{StaticResource
name_of_style}".
I know this is asking a lot, but it sure would be nice if I didn't
have to comment out a bunch of stuff to see my design. If you have any
helpful hints, please don't hold back.
Thx,
-Dan