Skip to content

Commit

Permalink
Add 11-style titlebar buttons (wip
Browse files Browse the repository at this point in the history
  • Loading branch information
NotYoojun committed Jun 30, 2024
1 parent e007b1f commit ec264eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions samples/ExamplePhotoTaker/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ExamplePhotoTaker" xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:local="clr-namespace:ExamplePhotoTaker" xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
mc:Ignorable="d" ui:WindowHelper.UseModernWindowStyle="True"
Title="MainWindow" Height="450" Width="800" Language="en-US">
<Grid>
Expand All @@ -24,10 +24,10 @@
<RowDefinition/>
</Grid.RowDefinitions>

<ui:SimpleStackPanel Orientation="Horizontal" Spacing="10" HorizontalAlignment="Center">
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="10" HorizontalAlignment="Center">
<Button x:Name="Button_NavigateToPage1" Content="To Page 1" Click="Button_NavigateToPage1_Click"/>
<Button x:Name="Button_NavigateToPage2" Content="To Page 2" Click="Button_NavigateToPage2_Click"/>
</ui:SimpleStackPanel>
</ikw:SimpleStackPanel>

<ui:Frame x:Name="Frame_Main" Navigating="Frame_Main_Navigating" Margin="10" Grid.Row="1"
BorderBrush="Gray" BorderThickness="2,2,2,2"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,18 @@
<StreamGeometry x:Key="ChromeMinimize">M 20 8 L 20 10 L 0 10 L 0 8 Z</StreamGeometry>
<StreamGeometry x:Key="ChromeMaximize">M 20 0 L 20 20 L 0 20 L 0 0 Z M 18 2 L 2 2 L 2 18 L 18 18 Z</StreamGeometry>
<StreamGeometry x:Key="ChromeRestore">M 20 16 L 16 16 L 16 20 L 0 20 L 0 4 L 4 4 L 4 0 L 20 0 Z M 14 6 L 2 6 L 2 18 L 14 18 Z M 18 2 L 6 2 L 6 4 L 16 4 L 16 14 L 18 14 Z</StreamGeometry>

<StreamGeometry x:Key="ChromeCloseContrast">M 20 2.832031 L 12.832031 10 L 20 17.167969 L 17.167969 20 L 10 12.832031 L 2.832031 20 L 0 17.167969 L 7.167969 10 L 0 2.832031 L 2.832031 0 L 10 7.167969 L 17.167969 0 L 20 2.832031 Z</StreamGeometry>
<StreamGeometry x:Key="ChromeMinimizeContrast">M 0 8 L 20 8 L 20 12 L 0 12 L 0 8 Z</StreamGeometry>
<StreamGeometry x:Key="ChromeMaximizeContrast">M 0 0 L 20 0 L 20 20 L 0 20 Z M 16 16 L 16 4 L 4 4 L 4 16 Z</StreamGeometry>
<StreamGeometry x:Key="ChromeRestoreContrast">M 20 0 L 20 14 L 14 14 L 14 20 L 0 20 L 0 6 L 6 6 L 6 0 Z M 10 16 L 10 10 L 4 10 L 4 16 Z M 16 10 L 16 4 L 10 4 L 10 6 L 14 6 L 14 10 Z</StreamGeometry>

<StreamGeometry x:Key="ChromeClose11">F1 M 10 11.416016 L 1.708984 19.707031 C 1.513672 19.902344 1.279297 20 1.005859 20 C 0.719401 20 0.480143 19.903971 0.288086 19.711914 C 0.096029 19.519857 0 19.2806 0 18.994141 C 0 18.720703 0.097656 18.486328 0.292969 18.291016 L 8.583984 10 L 0.292969 1.708984 C 0.097656 1.513672 0 1.276043 0 0.996094 C 0 0.859375 0.026042 0.729168 0.078125 0.605469 C 0.130208 0.481771 0.201823 0.375977 0.292969 0.288086 C 0.384115 0.200195 0.491536 0.130209 0.615234 0.078125 C 0.738932 0.026043 0.869141 0 1.005859 0 C 1.279297 0 1.513672 0.097656 1.708984 0.292969 L 10 8.583984 L 18.291016 0.292969 C 18.486328 0.097656 18.723957 0 19.003906 0 C 19.140625 0 19.269205 0.026043 19.389648 0.078125 C 19.51009 0.130209 19.615885 0.201824 19.707031 0.292969 C 19.798176 0.384115 19.869791 0.48991 19.921875 0.610352 C 19.973957 0.730795 20 0.859375 20 0.996094 C 20 1.276043 19.902344 1.513672 19.707031 1.708984 L 11.416016 10 L 19.707031 18.291016 C 19.902344 18.486328 20 18.720703 20 18.994141 C 20 19.130859 19.973957 19.261068 19.921875 19.384766 C 19.869791 19.508463 19.799805 19.615885 19.711914 19.707031 C 19.624023 19.798178 19.518229 19.869791 19.394531 19.921875 C 19.270832 19.973959 19.140625 20 19.003906 20 C 18.723957 20 18.486328 19.902344 18.291016 19.707031 Z</StreamGeometry>
<StreamGeometry x:Key="ChromeMinimize11">F1 M 0.996094 10 C 0.859375 10 0.730794 9.973959 0.610352 9.921875 C 0.489909 9.869792 0.384115 9.798178 0.292969 9.707031 C 0.201823 9.615886 0.130208 9.510092 0.078125 9.389648 C 0.026042 9.269206 0 9.140625 0 9.003906 C 0 8.867188 0.026042 8.738607 0.078125 8.618164 C 0.130208 8.497722 0.201823 8.3903 0.292969 8.295898 C 0.384115 8.201498 0.489909 8.128256 0.610352 8.076172 C 0.730794 8.024089 0.859375 7.998047 0.996094 7.998047 L 19.003906 7.998047 C 19.140625 7.998047 19.269205 8.024089 19.389648 8.076172 C 19.51009 8.128256 19.615885 8.201498 19.707031 8.295898 C 19.798176 8.3903 19.869791 8.497722 19.921875 8.618164 C 19.973957 8.738607 20 8.867188 20 9.003906 C 20 9.140625 19.973957 9.269206 19.921875 9.389648 C 19.869791 9.510092 19.798176 9.615886 19.707031 9.707031 C 19.615885 9.798178 19.51009 9.869792 19.389648 9.921875 C 19.269205 9.973959 19.140625 10 19.003906 10 Z</StreamGeometry>
<StreamGeometry x:Key="ChromeMaximize11">F1 M 2.949219 20 C 2.558594 20 2.184245 19.920248 1.826172 19.760742 C 1.468099 19.601236 1.153971 19.386393 0.883789 19.116211 C 0.613607 18.846029 0.398763 18.5319 0.239258 18.173828 C 0.079753 17.815756 0 17.441406 0 17.050781 L 0 2.949219 C 0 2.558594 0.079753 2.184246 0.239258 1.826172 C 0.398763 1.4681 0.613607 1.153973 0.883789 0.883789 C 1.153971 0.613607 1.468099 0.398764 1.826172 0.239258 C 2.184245 0.079754 2.558594 0 2.949219 0 L 17.050781 0 C 17.441406 0 17.815754 0.079754 18.173828 0.239258 C 18.5319 0.398764 18.846027 0.613607 19.116211 0.883789 C 19.386393 1.153973 19.601236 1.4681 19.760742 1.826172 C 19.920246 2.184246 20 2.558594 20 2.949219 L 20 17.050781 C 20 17.441406 19.920246 17.815756 19.760742 18.173828 C 19.601236 18.5319 19.386393 18.846029 19.116211 19.116211 C 18.846027 19.386393 18.5319 19.601236 18.173828 19.760742 C 17.815754 19.920248 17.441406 20 17.050781 20 Z M 17.001953 17.998047 C 17.138672 17.998047 17.267252 17.972006 17.387695 17.919922 C 17.508137 17.867838 17.613932 17.796225 17.705078 17.705078 C 17.796223 17.613932 17.867838 17.508139 17.919922 17.387695 C 17.972004 17.267252 17.998047 17.138672 17.998047 17.001953 L 17.998047 2.998047 C 17.998047 2.861328 17.972004 2.732748 17.919922 2.612305 C 17.867838 2.491863 17.796223 2.386068 17.705078 2.294922 C 17.613932 2.203777 17.508137 2.132162 17.387695 2.080078 C 17.267252 2.027996 17.138672 2.001953 17.001953 2.001953 L 2.998047 2.001953 C 2.861328 2.001953 2.732747 2.027996 2.612305 2.080078 C 2.491862 2.132162 2.386068 2.203777 2.294922 2.294922 C 2.203776 2.386068 2.132161 2.491863 2.080078 2.612305 C 2.027995 2.732748 2.001953 2.861328 2.001953 2.998047 L 2.001953 17.001953 C 2.001953 17.138672 2.027995 17.267252 2.080078 17.387695 C 2.132161 17.508139 2.203776 17.613932 2.294922 17.705078 C 2.386068 17.796225 2.491862 17.867838 2.612305 17.919922 C 2.732747 17.972006 2.861328 17.998047 2.998047 17.998047 Z</StreamGeometry>
<StreamGeometry x:Key="ChromeRestore11">F1 M 17.998047 5.927734 C 17.998047 5.387371 17.890625 4.877931 17.675781 4.399414 C 17.460938 3.920898 17.169596 3.504232 16.801758 3.149414 C 16.433918 2.794598 16.007486 2.514648 15.522461 2.30957 C 15.037434 2.104492 14.527994 2.001953 13.994141 2.001953 L 4.169922 2.001953 C 4.274088 1.702475 4.420573 1.429037 4.609375 1.181641 C 4.798177 0.934246 5.016276 0.722656 5.263672 0.546875 C 5.511067 0.371094 5.782877 0.236004 6.079102 0.141602 C 6.375325 0.047201 6.682942 0 7.001953 0 L 13.994141 0 C 14.820963 0 15.598957 0.157879 16.328125 0.473633 C 17.057291 0.789389 17.693684 1.217449 18.237305 1.757812 C 18.780924 2.298178 19.210611 2.932943 19.526367 3.662109 C 19.842121 4.391276 20 5.169271 20 5.996094 L 20 12.998047 C 20 13.317058 19.952799 13.624675 19.858398 13.920898 C 19.763996 14.217123 19.628906 14.488933 19.453125 14.736328 C 19.277344 14.983725 19.065754 15.201823 18.818359 15.390625 C 18.570963 15.579428 18.297525 15.725912 17.998047 15.830078 Z M 2.949219 20 C 2.558594 20 2.184245 19.920248 1.826172 19.760742 C 1.468099 19.601236 1.153971 19.386393 0.883789 19.116211 C 0.613607 18.846029 0.398763 18.5319 0.239258 18.173828 C 0.079753 17.815756 0 17.441406 0 17.050781 L 0 6.953125 C 0 6.55599 0.079753 6.180014 0.239258 5.825195 C 0.398763 5.470379 0.613607 5.157879 0.883789 4.887695 C 1.153971 4.617514 1.466471 4.40267 1.821289 4.243164 C 2.176107 4.08366 2.552083 4.003907 2.949219 4.003906 L 13.046875 4.003906 C 13.44401 4.003907 13.821614 4.08366 14.179688 4.243164 C 14.53776 4.40267 14.85026 4.615886 15.117188 4.882812 C 15.384114 5.14974 15.59733 5.46224 15.756836 5.820312 C 15.91634 6.178386 15.996093 6.55599 15.996094 6.953125 L 15.996094 17.050781 C 15.996093 17.447916 15.91634 17.823893 15.756836 18.178711 C 15.59733 18.533529 15.382486 18.846029 15.112305 19.116211 C 14.842121 19.386393 14.529621 19.601236 14.174805 19.760742 C 13.819986 19.920248 13.44401 20 13.046875 20 Z M 12.998047 17.998047 C 13.134766 17.998047 13.263346 17.972006 13.383789 17.919922 C 13.50423 17.867838 13.611652 17.796225 13.706055 17.705078 C 13.800455 17.613932 13.873697 17.508139 13.925781 17.387695 C 13.977863 17.267252 14.003905 17.138672 14.003906 17.001953 L 14.003906 7.001953 C 14.003905 6.865234 13.977863 6.735026 13.925781 6.611328 C 13.873697 6.487631 13.802083 6.380209 13.710938 6.289062 C 13.619791 6.197917 13.512369 6.126303 13.388672 6.074219 C 13.264974 6.022137 13.134766 5.996095 12.998047 5.996094 L 2.998047 5.996094 C 2.861328 5.996095 2.732747 6.022137 2.612305 6.074219 C 2.491862 6.126303 2.386068 6.199545 2.294922 6.293945 C 2.203776 6.388348 2.132161 6.49577 2.080078 6.616211 C 2.027995 6.736654 2.001953 6.865234 2.001953 7.001953 L 2.001953 17.001953 C 2.001953 17.138672 2.027995 17.267252 2.080078 17.387695 C 2.132161 17.508139 2.203776 17.613932 2.294922 17.705078 C 2.386068 17.796225 2.491862 17.867838 2.612305 17.919922 C 2.732747 17.972006 2.861328 17.998047 2.998047 17.998047 Z</StreamGeometry>


<DataTemplate x:Key="IconTemplate">
<local:FontIconFallback Data="{Binding}" />
</DataTemplate>
Expand Down

0 comments on commit ec264eb

Please sign in to comment.