Guest User

Untitled

a guest
Feb 17th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. <App>
  2.  
  3. <!-- I set some default values of the class -->
  4. <Panel ux:Class="rbt.QuoteText" Padding="10" FontSize="32" TextAlignment="Left">
  5.  
  6. <!-- Some properties of the Class -->
  7. <string ux:Property="TextIn" />
  8. <string ux:Property="TextAlignment" />
  9. <int ux:Property="FontSize" />
  10. <bool ux:Property="IsAuthor" />
  11.  
  12. <!-- The text component uses some of the incoming properties values -->
  13. <Text Value="{ReadProperty TextIn}" FontSize="{ReadProperty FontSize}" Alignment="{ReadProperty TextAlignment}" />
  14.  
  15. <!-- Some goodness that changes the above text components values according to an incoming value -->
  16. <WhileTrue Value="{ReadProperty IsAuthor}">
  17. <Change this.FontSize="18" />
  18. <Change this.TextAlignment="Right" />
  19. </WhileTrue>
  20.  
  21. </Panel>
  22.  
  23. <!-- What the name says, its a layout component that "stacks" each component declared within it -->
  24. <StackPanel Alignment="Center">
  25.  
  26. <!-- Instances of my QuoteText Class defined above -->
  27. <rbt.QuoteText TextIn="The greatest glory" />
  28. <rbt.QuoteText TextIn="in living lies not in" />
  29. <rbt.QuoteText TextIn="never falling," />
  30. <rbt.QuoteText TextIn="but in rising" />
  31. <rbt.QuoteText TextIn="every time we fall." />
  32. <rbt.QuoteText TextIn="~ Nelson Mandela" IsAuthor="true" />
  33. </StackPanel>
  34.  
  35. </App>
Add Comment
Please, Sign In to add comment