If I want to create a button control like that, is it supposed to be a User Control or a Custom Control? I am not sure maybe something else? Ideally I want to be able style/animate the main button and the inner button separately; also obviously Ill need to process their events separately. These buttons will be created at run-time and Ill need to set the icons dynamically.
+2
A:
I'd suggest a user control. You can still create your basic styling in xaml and use code for the dynamic stuff.
You'd basically have something like this:
<Button>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Image Source="" Grid.Column="0" />
<TextBlock Grid.Column="1">Your button text</TextBlock>
<Image Source="" Grid.Column="2"/>
</Grid>
</Button>
Padu Merloti
2010-05-16 00:03:45
I haven't thought that I should make the inner button an Image... Thanks! I'll give it a try and see how this works.
m0s
2010-05-16 05:30:42