Created
February 15, 2019 13:25
-
-
Save AndrewEQ/ed000c15d940d66fdfee0db626dbe8fa to your computer and use it in GitHub Desktop.
UX Example Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment