-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update InfoBarSamplePage.xaml with more Infos and color as well added… #1027
Draft
AryanParashar24
wants to merge
2
commits into
unoplatform:master
Choose a base branch
from
AryanParashar24:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,39 @@ | ||
<Page x:Class="Uno.Gallery.Views.SamplePages.InfoBarSamplePage" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:Uno.Gallery.Views.SamplePages" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:sample="using:Uno.Gallery" | ||
xmlns:smtx="using:ShowMeTheXAML" | ||
xmlns:winui="using:Microsoft.UI.Xaml.Controls" | ||
mc:Ignorable="d"> | ||
<Page x:Class="Uno.Gallery.Views.SamplePages.InfoBarSamplePage" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:Uno.Gallery.Views.SamplePages" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:sample="using:Uno.Gallery" | ||
xmlns:smtx="using:ShowMeTheXAML" | ||
xmlns:winui="using:Microsoft.UI.Xaml.Controls" | ||
mc:Ignorable="d"> | ||
|
||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | ||
<sample:SamplePageLayout> | ||
<sample:SamplePageLayout.MaterialTemplate> | ||
<DataTemplate> | ||
<StackPanel Spacing="20" | ||
Margin="0,20,0,0"> | ||
<Page.Resources> | ||
<!-- Button Styles --> | ||
<Style x:Key="ErrorButtonStyle" TargetType="Button"> | ||
<Setter Property="Background" Value="Red" /> | ||
<Setter Property="Foreground" Value="White" /> | ||
</Style> | ||
|
||
<Style x:Key="SuccessButtonStyle" TargetType="Button"> | ||
<Setter Property="Background" Value="Blue" /> | ||
<Setter Property="Foreground" Value="White" /> | ||
</Style> | ||
|
||
<Style x:Key="InformationButtonStyle" TargetType="Button"> | ||
<Setter Property="Background" Value="Yellow" /> | ||
<Setter Property="Foreground" Value="Black" /> | ||
</Style> | ||
<!-- Add more styles as needed for different severities --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "severities" or "scenarios"? |
||
</Page.Resources> | ||
|
||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | ||
<sample:SamplePageLayout> | ||
<sample:SamplePageLayout.MaterialTemplate> | ||
<DataTemplate> | ||
<StackPanel Spacing="20" | ||
Margin="0,20,0,0"> | ||
<smtx:XamlDisplay UniqueKey="Material_InfoBarSamplePage_Error_SingleButton"> | ||
<winui:InfoBar x:Name="firstInfo" | ||
Title="Title" | ||
|
@@ -24,7 +43,7 @@ | |
Severity="Error" | ||
Style="{StaticResource MaterialInfoBarStyle}"> | ||
<winui:InfoBar.Content> | ||
<Button Style="{StaticResource TextButtonStyle}" | ||
<Button Style="{StaticResource ErrorButtonStyle}" | ||
Content="DISMISS" /> | ||
</winui:InfoBar.Content> | ||
<winui:InfoBar.IconSource> | ||
|
@@ -45,9 +64,9 @@ | |
<winui:InfoBar.Content> | ||
<StackPanel Orientation="Horizontal" | ||
Spacing="8"> | ||
<Button Style="{StaticResource TextButtonStyle}" | ||
<Button Style="{StaticResource WarningButtonStyle}" | ||
Content="DISMISS" /> | ||
<Button Style="{StaticResource TextButtonStyle}" | ||
<Button Style="{StaticResource WarningButtonStyle}" | ||
Content="ACTION" /> | ||
</StackPanel> | ||
</winui:InfoBar.Content> | ||
|
@@ -67,7 +86,7 @@ | |
IsIconVisible="False" | ||
Style="{StaticResource MaterialInfoBarStyle}"> | ||
<winui:InfoBar.Content> | ||
<Button Style="{StaticResource TextButtonStyle}" | ||
<Button Style="{StaticResource SuccessButtonStyle}" | ||
Content="DISMISS" /> | ||
</winui:InfoBar.Content> | ||
</winui:InfoBar> | ||
|
@@ -83,7 +102,7 @@ | |
IsIconVisible="True" | ||
Style="{StaticResource MaterialInfoBarStyle}"> | ||
<winui:InfoBar.ActionButton> | ||
<Button Style="{StaticResource TextButtonStyle}" | ||
<Button Style="{StaticResource InformationButtonStyle}" | ||
Content="DISMISS" /> | ||
</winui:InfoBar.ActionButton> | ||
<winui:InfoBar.IconSource> | ||
|
@@ -92,6 +111,42 @@ | |
</winui:InfoBar.IconSource> | ||
</winui:InfoBar> | ||
</smtx:XamlDisplay> | ||
<smtx:XamlDisplay UniqueKey="Material_InfoBarSamplePage_InProgress_SingleButton"> | ||
<winui:InfoBar x:Name="fifthInfo" | ||
Title="Title" | ||
IsOpen="True" | ||
Message="Process is in progress. Please wait..." | ||
Severity="Informational" | ||
MinHeight="54" | ||
IsIconVisible="True" | ||
Style="{StaticResource MaterialInfoBarStyle}"> | ||
<winui:InfoBar.Content> | ||
<Button Style="{StaticResource InformationButtonStyle}" | ||
Content="DISMISS" /> | ||
</winui:InfoBar.Content> | ||
<winui:InfoBar.IconSource> | ||
<winui:BitmapIconSource UriSource="/Assets/MaterialIcon_Medium.png" | ||
Foreground="{ThemeResource PrimaryBrush}" /> | ||
</winui:InfoBar.IconSource> | ||
</winui:InfoBar> | ||
</smtx:XamlDisplay> | ||
<smtx:XamlDisplay UniqueKey="Material_InfoBarSamplePage_Timeout_SingleButton"> | ||
<winui:InfoBar x:Name="sixthInfo" | ||
Title="Timeout/Expired" | ||
IsOpen="True" | ||
Message="The process has timed out or expired. Please try again." | ||
Severity="Informational" | ||
MinHeight="54" | ||
IsIconVisible="True" | ||
Style="{StaticResource MaterialInfoBarStyle}"> | ||
<Button Style="{StaticResource ErrorButtonStyle}" | ||
Content="TRY AGAIN" /> | ||
<winui:InfoBar.IconSource> | ||
<winui:BitmapIconSource UriSource="/Assets/MaterialIcon_Medium.png" | ||
Foreground="{ThemeResource PrimaryBrush}" /> | ||
</winui:InfoBar.IconSource> | ||
</winui:InfoBar> | ||
</smtx:XamlDisplay> | ||
</StackPanel> | ||
</DataTemplate> | ||
</sample:SamplePageLayout.MaterialTemplate> | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is anything lost by not basing these new styles on
TextButtonStyle
?Such as Min sizes and different focus visuals?
Is this intentional/deliberate? All you've done is change the styles to use different colors and with no explanation of why.