Skip to content

Commit

Permalink
Not ready for the release to gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
NotYoojun committed May 23, 2024
1 parent 80e6b50 commit 5eda0f6
Show file tree
Hide file tree
Showing 71 changed files with 1,061 additions and 69 deletions.
Binary file added assets/icons/Gallery.ico
Binary file not shown.
Binary file added assets/icons/Gallery_1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/Gallery_256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
815 changes: 815 additions & 0 deletions installer/Gallery.aip

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions source/iNKORE.UI.WPF.Modern.Gallery/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using iNKORE.UI.WPF.Modern.Gallery.DataModel;
using System.Reflection;
using System;
using System.Diagnostics;
using System.Windows;

namespace iNKORE.UI.WPF.Modern.Gallery
{
Expand All @@ -16,5 +18,18 @@ public static TEnum GetEnum<TEnum>(string text) where TEnum : struct
}
return (TEnum)Enum.Parse(typeof(TEnum), text);
}

public static Process BrowseWeb(string path)
{
try
{
return Process.Start(new ProcessStartInfo(path) { UseShellExecute = true });
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
return null;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<UserControl x:Class="iNKORE.UI.WPF.Modern.Gallery.Controls.UserControls.DocumentationPromotion"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:iNKORE.UI.WPF.Modern.Gallery.Controls.UserControls" xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
d:DesignWidth="640"
mc:Ignorable="d" >
<Grid>
<Border Background="{DynamicResource {x:Static ui:ThemeKeys.LayerFillColorDefaultBrushKey}}"
BorderBrush="{DynamicResource {x:Static ui:ThemeKeys.CardStrokeColorDefaultBrushKey}}"
CornerRadius="8" BorderThickness="1" Padding="12, 10" TextElement.FontSize="14">

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>

<ui:SimpleStackPanel Orientation="Horizontal" Spacing="8" TextElement.Foreground="{DynamicResource {x:Static ui:ThemeKeys.AccentTextFillColorPrimaryBrushKey}}"
Margin="0,3,0,0">
<ui:FontIcon Icon="{x:Static ui:FluentSystemIcons.TextBulletListSquareEdit_24_Regular}" FontSize="24"/>
<TextBlock FontSize="16" VerticalAlignment="Center" FontWeight="SemiBold">It's time for a brand-new docmentation set!</TextBlock>
</ui:SimpleStackPanel>

<ui:SimpleStackPanel Orientation="Vertical" Spacing="12" Grid.Row="1" Margin="5,10">
<FrameworkElement.Resources>
<Style TargetType="TextBlock">
<Setter Property="LineHeight" Value="21"/>
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="TextAlignment" Value="Justify"/>
</Style>
</FrameworkElement.Resources>

<TextBlock>
<Run>We are looking for passionate volunteers to help us write and improve the documentation for the iNKORE.UI.WPF.Modern library. Your contributions will be invaluable in making this project more accessible and user-friendly for the entire community.</Run>
</TextBlock>
<TextBlock>
<Run>Whether you are an experienced developer or just enthusiastic about contributing to open-source, we welcome your help!</Run>
</TextBlock>

<TextBlock>
<Run>It's very easy to join us! You can create a PR in our</Run>
<Hyperlink x:Name="Hyperlink_DoucmentationRepo" Click="Hyperlink_DoucmentationRepo_Click">Doucmentation repository</Hyperlink>
<Run>when you're free. You can also join our</Run>
<Hyperlink x:Name="Hyperlink_Discord" Click="Hyperlink_Discord_Click">Discord server</Hyperlink>
<Run>and</Run>
<Hyperlink x:Name="Hyperlink_Telegram" Click="Hyperlink_Telegram_Click">Telegram group</Hyperlink>
<Run>to hang out with us.</Run>
</TextBlock>
<Separator Opacity="0.2"/>
</ui:SimpleStackPanel>

<ui:SimpleStackPanel Grid.Row="3" Orientation="Horizontal" Spacing="10">

<ui:HyperlinkButton x:Name="HyperlinkButton_Repository" Content="Repository" Click="HyperlinkButton_Repository_Click"/>
<ui:HyperlinkButton x:Name="HyperlinkButton_Package" Content="Package" Click="HyperlinkButton_Package_Click"/>

<ui:HyperlinkButton x:Name="HyperlinkButton_DocRepository" Content="Docs Repository" Click="Hyperlink_DoucmentationRepo_Click"/>
<ui:HyperlinkButton x:Name="HyperlinkButton_Facebook" Content="Follow us on Facebook!" Click="HyperlinkButton_Facebook_Click"/>

</ui:SimpleStackPanel>
</Grid>
</Border>

</Grid>
</UserControl>
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace iNKORE.UI.WPF.Modern.Gallery.Controls.UserControls
{
/// <summary>
/// DocumentationPromotion.xaml 的交互逻辑
/// </summary>
public partial class DocumentationPromotion : UserControl
{
public DocumentationPromotion()
{
InitializeComponent();
}

private void HyperlinkButton_Repository_Click(object sender, RoutedEventArgs e)
{
App.BrowseWeb(ThemeManager.Link_GithubRepo);
}

private void HyperlinkButton_Package_Click(object sender, RoutedEventArgs e)
{
App.BrowseWeb(ThemeManager.Link_NugetPackage);
}

private void Hyperlink_DoucmentationRepo_Click(object sender, RoutedEventArgs e)
{
App.BrowseWeb("https://github.com/iNKORE-NET/Documentation/tree/main/data/docs/ui.wpf.modern");
}

private void Hyperlink_Discord_Click(object sender, RoutedEventArgs e)
{
App.BrowseWeb(ThemeManager.Link_DiscordServer);
}

private void Hyperlink_Telegram_Click(object sender, RoutedEventArgs e)
{
App.BrowseWeb(ThemeManager.Link_TelegramGroup);

}

private void HyperlinkButton_Facebook_Click(object sender, RoutedEventArgs e)
{
App.BrowseWeb(ThemeManager.Link_FacebookPage);
}

}
}
2 changes: 1 addition & 1 deletion source/iNKORE.UI.WPF.Modern.Gallery/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
Grid.Column="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Source="pack://Application:,,,/iNKORE.UI.WPF.Modern.Gallery;component/Assets/AppIcon.ico" />
Source="/Assets/Gallery_256.png" />
<ui:ProgressRing
Name="splashProgressRing"
Grid.Row="2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
</ui:AutoSuggestBox>
</ui:NavigationView.AutoSuggestBox>

<ui:Frame x:Name="rootFrame" Navigated="OnRootFrameNavigated" />
<ui:Frame x:Name="rootFrame" Navigating="OnRootFrameNavigating" Navigated="OnRootFrameNavigated" />
</ui:NavigationView>
</Grid>
</ui:Page>
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,23 @@ private void Page_Loaded(object sender, RoutedEventArgs e)
XboxContentSafeRect.Visibility = Visibility.Visible;
}
}

private void rootFrame_Navigating(object sender, NavigatingCancelEventArgs e)
{

}

private void OnRootFrameNavigating(object sender, NavigatingCancelEventArgs e)
{
if (e.Uri != null)
{
if(e.Uri.Scheme.ToLower().StartsWith("http"))
{
e.Cancel = true;
App.BrowseWeb(e.Uri.OriginalString);
}
}
}
}

public enum DeviceType
Expand Down
55 changes: 30 additions & 25 deletions source/iNKORE.UI.WPF.Modern.Gallery/NewControlsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:iNKORE.UI.WPF.Modern.Gallery"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" xmlns:uc="clr-namespace:iNKORE.UI.WPF.Modern.Gallery.Controls.UserControls"
Title="New Controls"
d:DesignWidth="800"
d:DesignWidth="800" FontSize="14"
mc:Ignorable="d">
<local:ItemsPageBase.Resources>
<ResourceDictionary>
Expand Down Expand Up @@ -71,29 +71,34 @@
Text="{x:Static ui:ThemeManager.AssemblyVersion}"
Visibility="Visible" />
</StackPanel>
<StackPanel x:Name="HeaderTileOuterGrid" Orientation="Horizontal">
<WrapPanel
x:Name="HeaderTileGrid"
Margin="0,287,0,0"
Orientation="Horizontal">
<controls:HeaderTile
Title="Getting Started"
Link="https://docs.microsoft.com/windows/apps/get-started/"
Source="/Assets/gettingStarted.png" />
<controls:HeaderTile
Title="Windows Design"
Link="https://docs.microsoft.com/windows/apps/design/"
Source="/Assets/style-1x.png" />
<controls:HeaderTile
Title="GitHub Repo"
Link="https://github.com/microsoft/microsoft-ui-xaml"
Source="/Assets/githubTile.png" />
<controls:HeaderTile
Title="Template Studio"
Link="https://marketplace.visualstudio.com/items?itemName=TemplateStudio.TemplateStudioForWinUICs"
Source="/Assets/template_studio.png" />
</WrapPanel>
</StackPanel>

<ui:SimpleStackPanel x:Name="HeaderTileOuterGrid" Margin="0,287,0,0" Orientation="Vertical" Spacing="10">

<uc:DocumentationPromotion/>
<StackPanel Orientation="Horizontal">
<WrapPanel
x:Name="HeaderTileGrid"

Orientation="Horizontal">
<controls:HeaderTile
Title="Getting Started"
Link="https://docs.microsoft.com/windows/apps/get-started/"
Source="/Assets/gettingStarted.png" />
<controls:HeaderTile
Title="Windows Design"
Link="https://docs.microsoft.com/windows/apps/design/"
Source="/Assets/style-1x.png" />
<controls:HeaderTile
Title="GitHub Repo"
Link="https://github.com/microsoft/microsoft-ui-xaml"
Source="/Assets/githubTile.png" />
<controls:HeaderTile
Title="Template Studio"
Link="https://marketplace.visualstudio.com/items?itemName=TemplateStudio.TemplateStudioForWinUICs"
Source="/Assets/template_studio.png" />
</WrapPanel>
</StackPanel>
</ui:SimpleStackPanel>
</Grid>
</ui:ListViewHelper.Header>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Text;
Expand Down
23 changes: 13 additions & 10 deletions source/iNKORE.UI.WPF.Modern.Gallery/SettingsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:iNKORE.UI.WPF.Modern.Gallery"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" xmlns:uc="clr-namespace:iNKORE.UI.WPF.Modern.Gallery.Controls.UserControls"
Title="Settings Page"
d:DesignHeight="450"
d:DesignWidth="800"
DataContext="{Binding RelativeSource={RelativeSource Mode=Self}}"
mc:Ignorable="d">
Expand Down Expand Up @@ -40,7 +39,7 @@
Tag="Default" />
</StackPanel>

<TextBlock
<!--<TextBlock
Margin="0,40,0,0"
Style="{DynamicResource SubtitleTextBlockStyle}"
Text="Sound" />
Expand All @@ -64,7 +63,7 @@
Style="{DynamicResource CaptionTextBlockStyle}">
See the<Hyperlink x:Name="soundPageHyperlink" Click="soundPageHyperlink_Click">Sound page</Hyperlink>
for how to enable sound in your app!</TextBlock>
</StackPanel>
</StackPanel>-->

<TextBlock
Margin="0,40,0,0"
Expand Down Expand Up @@ -121,28 +120,29 @@
Margin="0,40,0,0"
Style="{DynamicResource SubtitleTextBlockStyle}"
Text="About" />
<FlowDocumentScrollViewer MaxWidth="840" Margin="0,10,0,0">
<FlowDocumentScrollViewer MaxWidth="840" Margin="0,10,0,0" ScrollViewer.VerticalScrollBarVisibility="Disabled">
<FlowDocument FontFamily="{DynamicResource ContentControlThemeFontFamily}" FontSize="{DynamicResource ContentControlFontSize}">
<Paragraph>
<Run Text="This app is the interactive companion to the " />
<Hyperlink NavigateUri="https://developer.microsoft.com/windows/apps/design">Fluent Design System web site</Hyperlink>
<Run FontWeight="SemiBold">iNKORE.UI.WPF.Modern</Run>
<Run Text="." />
</Paragraph>
<Paragraph Margin="0,10,0,0">
<Run Text="Source code: " />
<Hyperlink NavigateUri="https://github.com/microsoft/WinUI-Gallery">GitHub</Hyperlink>
<Hyperlink x:Name="Hyperlink_github">GitHub</Hyperlink>
</Paragraph>
<Paragraph Margin="0,10,0,0">
<Run Text="To clone the source repository: " />
<Run FontStyle="Italic">git clone https://github.com/microsoft/WinUI-Gallery</Run>
<Run FontStyle="Italic">git clone</Run>
<Run Text="{x:Static ui:ThemeManager.Link_GithubRepo}"/>
</Paragraph>
</FlowDocument>
</FlowDocumentScrollViewer>
<TextBlock Margin="0,10,0,0">
Version:<Run FontWeight="Bold" Text="{Binding Version, Mode=OneWay}" />
</TextBlock>

<TextBlock
<!--<TextBlock
Margin="0,40,0,0"
Style="{DynamicResource SubtitleTextBlockStyle}"
Text="Found a bug? Want a new sample?" />
Expand Down Expand Up @@ -227,7 +227,10 @@
<Hyperlink NavigateUri="https://go.microsoft.com/fwlink/?LinkId=521839">Microsoft Privacy Statement</Hyperlink>
</Paragraph>
</FlowDocument>
</FlowDocumentScrollViewer>
</FlowDocumentScrollViewer>-->

<uc:DocumentationPromotion Margin="0,20,60,60"/>

</StackPanel>
</ScrollViewer>
</Grid>
Expand Down
Loading

0 comments on commit 5eda0f6

Please sign in to comment.