This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
68 additions
and
3 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
45 changes: 45 additions & 0 deletions
45
Xamarin.Forms.Controls/GalleryPages/ExpanderGalleries/ExpanderGalleries.cs
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
namespace Xamarin.Forms.Controls.GalleryPages.ExpanderGalleries | ||
{ | ||
public class ExpanderGalleries : ContentPage | ||
{ | ||
public ExpanderGalleries() | ||
{ | ||
var descriptionLabel = | ||
new Label { Text = "Expander Galleries", Margin = new Thickness(2, 2, 2, 2) }; | ||
|
||
Title = "Expander Galleries"; | ||
|
||
var button = new Button | ||
{ | ||
Text = "Enable Expander", | ||
AutomationId = "EnableExpander" | ||
}; | ||
button.Clicked += ButtonClicked; | ||
|
||
Content = new ScrollView | ||
{ | ||
Content = new StackLayout | ||
{ | ||
Children = | ||
{ | ||
descriptionLabel, | ||
button, | ||
GalleryBuilder.NavButton("Expander Gallery", () => | ||
new ExpanderGallery(), Navigation) | ||
} | ||
} | ||
}; | ||
} | ||
|
||
void ButtonClicked(object sender, System.EventArgs e) | ||
{ | ||
var button = sender as Button; | ||
|
||
button.Text = "Expander Enabled!"; | ||
button.TextColor = Color.Black; | ||
button.IsEnabled = false; | ||
|
||
Device.SetFlags(new[] { ExperimentalFlags.ExpanderExperimental }); | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ontrols/GalleryPages/ExpanderGallery.xaml → ...es/ExpanderGalleries/ExpanderGallery.xaml
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
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