Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <App>
- <!-- I set some default values of the class -->
- <Panel ux:Class="rbt.QuoteText" Padding="10" FontSize="32" TextAlignment="Left">
- <!-- Some properties of the Class -->
- <string ux:Property="TextIn" />
- <string ux:Property="TextAlignment" />
- <int ux:Property="FontSize" />
- <bool ux:Property="IsAuthor" />
- <!-- The text component uses some of the incoming properties values -->
- <Text Value="{ReadProperty TextIn}" FontSize="{ReadProperty FontSize}" Alignment="{ReadProperty TextAlignment}" />
- <!-- Some goodness that changes the above text components values according to an incoming value -->
- <WhileTrue Value="{ReadProperty IsAuthor}">
- <Change this.FontSize="18" />
- <Change this.TextAlignment="Right" />
- </WhileTrue>
- </Panel>
- <!-- What the name says, its a layout component that "stacks" each component declared within it -->
- <StackPanel Alignment="Center">
- <!-- Instances of my QuoteText Class defined above -->
- <rbt.QuoteText TextIn="The greatest glory" />
- <rbt.QuoteText TextIn="in living lies not in" />
- <rbt.QuoteText TextIn="never falling," />
- <rbt.QuoteText TextIn="but in rising" />
- <rbt.QuoteText TextIn="every time we fall." />
- <rbt.QuoteText TextIn="~ Nelson Mandela" IsAuthor="true" />
- </StackPanel>
- </App>
Add Comment
Please, Sign In to add comment