[Windows Store]Creating Custom UI elements

I need something that is a button, but has StackPanel as a child with a few different objects:

<Button HorizontalAlignment="Stretch"> <StackPanel Margin="10"> <TextBlock Name="sName" FontWeight="Bold" FontSize="15">Name</TextBlock> <TextBlock Name="sDesc" FontSize="13" TextWrapping="WrapWholeWords">Desctiption</TextBlock> <ProgressBar Name="sProgress" Height="18" /> </StackPanel> </Button> 

Something like the code above. I would like to be able to instantiate it with one line of code (something like Prefabs in Unity3D) and be able to set content fairly easy. For example something like this:

<sBlock sName="Name" sDesc="Desc" sProgress="0.2" /> 

Is something like this possible? How can I create class/element like this and what tutorials might be helpful?

Sorry for asking all those dumb questions. I just really want to finish my first W8 app.

by MrReynevan2 via /r/csharp

Leave a Reply