forked from microsoft/WinUI-Gallery
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the sample code to match the actual code (microsoft#1709)
<!--- Provide a general summary of your changes in the Title above --> ## Description <!--- Describe your changes in detail --> This PR updates the sample code on the `TeachingTip` page to match the actual code. ## Motivation and Context <!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here. --> The current sample code doesn't match the actual code and doesn't even compile. ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> Ran the app and confirmed its contents. ## Screenshots (if appropriate): ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change)
- Loading branch information
1 parent
b317539
commit f22541c
Showing
5 changed files
with
61 additions
and
46 deletions.
There are no files selected for viewing
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
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
15 changes: 9 additions & 6 deletions
15
WinUIGallery/ControlPagesSampleCode/TeachingTip/TeachingTipSample1_xaml.txt
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
24 changes: 12 additions & 12 deletions
24
WinUIGallery/ControlPagesSampleCode/TeachingTip/TeachingTipSample2_xaml.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<Button Content="Show TeachingTip" Click="TestButtonClick2" /> | ||
|
||
<TeachingTip x:Name="ToggleThemeTeachingTip2" | ||
Title="Change themes without hassle" | ||
Subtitle="It's easier than ever to see control samples in both light and dark theme!" | ||
PreferredPlacement="Auto" | ||
PlacementMargin="20" | ||
IsLightDismissEnabled="True" | ||
ActionButtonClick="ToggleThemeTeachingTip2_ActionButtonClick" | ||
ActionButtonContent="Toggle theme now" | ||
CloseButtonContent="Got it!"> | ||
</TeachingTip> | ||
<Button | ||
Click="TestButton2Click" | ||
Content="Show TeachingTip" /> | ||
<TeachingTip | ||
x:Name="TestButton2TeachingTip" | ||
Title="This is the title" | ||
ActionButtonContent="Action button" | ||
CloseButtonContent="Close button" | ||
IsLightDismissEnabled="True" | ||
PlacementMargin="20" | ||
PreferredPlacement="Auto" | ||
Subtitle="And this is the subtitle" /> |
26 changes: 17 additions & 9 deletions
26
WinUIGallery/ControlPagesSampleCode/TeachingTip/TeachingTipSample3_xaml.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
<Button Content="Show TeachingTip" Click="TestButtonClick3" /> | ||
|
||
<TeachingTip x:Name="ToggleThemeTeachingTip3" | ||
Target="{x:Bind ThemeButton}" | ||
Title="Change themes without hassle" | ||
Subtitle="It's easier than ever to see control samples in both light and dark theme!" | ||
PreferredPlacement="LeftEdgeAlignedBottom"> | ||
<Button | ||
x:Name="TestButton3" | ||
Click="TestButton3Click" | ||
Content="Show TeachingTip" /> | ||
<TeachingTip | ||
x:Name="TestButton3TeachingTip" | ||
Title="This is the title" | ||
PreferredPlacement="Bottom" | ||
Subtitle="And this is the subtitle" | ||
Target="{x:Bind TestButton3}"> | ||
<TeachingTip.HeroContent> | ||
<Image Source="/Assets/SampleMedia/sunset.jpg" AutomationProperties.Name="Sunset" /> | ||
<Image | ||
AutomationProperties.Name="Sunset" | ||
Source="/Assets/SampleMedia/sunset.jpg" /> | ||
</TeachingTip.HeroContent> | ||
<TeachingTip.Content> | ||
<TextBlock TextWrapping="WrapWholeWords" Margin="0,16,0,0">To change your desktop theme visit the <Hyperlink NavigateUri="ms-settings:colors">Settings app</Hyperlink>.</TextBlock> | ||
<TextBlock | ||
Margin="0,16,0,0" | ||
Text="Description can go here" | ||
TextWrapping="WrapWholeWords" /> | ||
</TeachingTip.Content> | ||
</TeachingTip> |