Skip to content

Commit c6763a4

Browse files
committed
fixed #468
1 parent e82d588 commit c6763a4

3 files changed

Lines changed: 172 additions & 90 deletions

File tree

src/Shared/HandyControlDemo_Shared/UserControl/Styles/ToolBarDemoCtl.xaml

Lines changed: 74 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -7,56 +7,82 @@
77
DataContext="{Binding ComboBoxDemo,Source={StaticResource Locator}}"
88
Background="{DynamicResource RegionBrush}">
99
<hc:TransitioningContentControl>
10-
<ToolBarTray Margin="32" VerticalAlignment="Center">
11-
<ToolBar Padding="6" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}">
12-
<CheckBox IsChecked="True" Margin="10,0,0,0"/>
13-
<Separator Margin="10,0,0,0"/>
14-
<RadioButton Margin="10,0,0,0"/>
15-
<StackPanel Orientation="Horizontal">
16-
<RadioButton IsChecked="True" Margin="10,0,0,0"/>
10+
<StackPanel Margin="32">
11+
<ToolBarTray VerticalAlignment="Center">
12+
<ToolBar Padding="6" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}">
13+
<CheckBox IsChecked="True" Margin="10,0,0,0"/>
14+
<Separator Margin="10,0,0,0"/>
1715
<RadioButton Margin="10,0,0,0"/>
18-
</StackPanel>
19-
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}" Margin="10,0,0,0"/>
20-
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}" Margin="10,0,0,0" Style="{StaticResource ButtonPrimary}"/>
21-
</ToolBar>
22-
<ToolBar Band="1" Padding="6">
23-
<ComboBox ItemsSource="{Binding DataList}" SelectedIndex="0" Width="230"/>
24-
<TextBox Text="{ex:Lang Key={x:Static langs:LangKeys.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=4,Mode=OneWay}" Margin="10,0,0,0" Width="230"/>
25-
</ToolBar>
26-
<ToolBar Band="0" Padding="6">
27-
<Menu Background="Transparent" VerticalAlignment="Center">
28-
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Repository}}">
29-
<MenuItem Header="GitHub">
30-
<MenuItem.Icon>
31-
<Path Data="{StaticResource GithubGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
32-
</MenuItem.Icon>
16+
<StackPanel Orientation="Horizontal">
17+
<RadioButton IsChecked="True" Margin="10,0,0,0"/>
18+
<RadioButton Margin="10,0,0,0"/>
19+
</StackPanel>
20+
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}" Margin="10,0,0,0"/>
21+
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}" Margin="10,0,0,0" Style="{StaticResource ButtonPrimary}"/>
22+
</ToolBar>
23+
<ToolBar Band="1" Padding="6">
24+
<ComboBox Margin="10,0,0,0" ItemsSource="{Binding DataList}" SelectedIndex="0" Width="230"/>
25+
<TextBox Text="{ex:Lang Key={x:Static langs:LangKeys.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=4,Mode=OneWay}" Margin="10,0,0,0" Width="230"/>
26+
</ToolBar>
27+
<ToolBar Band="0" Padding="6">
28+
<Menu Background="Transparent" VerticalAlignment="Center">
29+
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Repository}}">
30+
<MenuItem Header="GitHub">
31+
<MenuItem.Icon>
32+
<Path Data="{StaticResource GithubGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
33+
</MenuItem.Icon>
34+
</MenuItem>
35+
<MenuItem Header="NuGet">
36+
<MenuItem.Icon>
37+
<Path Data="{StaticResource NugetGeometry}" Fill="#224880"/>
38+
</MenuItem.Icon>
39+
</MenuItem>
3340
</MenuItem>
34-
<MenuItem Header="NuGet">
35-
<MenuItem.Icon>
36-
<Path Data="{StaticResource NugetGeometry}" Fill="#224880"/>
37-
</MenuItem.Icon>
41+
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.About}}">
42+
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Email}}">
43+
<MenuItem.Icon>
44+
<Path Data="{StaticResource EmailGeometry}" Fill="{DynamicResource PrimaryBrush}"/>
45+
</MenuItem.Icon>
46+
</MenuItem>
47+
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Chatroom}}">
48+
<MenuItem.Icon>
49+
<Path Data="{StaticResource GitterGeometry}" Fill="#e52e64"/>
50+
</MenuItem.Icon>
51+
</MenuItem>
52+
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Blog}}">
53+
<MenuItem.Icon>
54+
<Path Data="{StaticResource CnblogsGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
55+
</MenuItem.Icon>
56+
</MenuItem>
3857
</MenuItem>
39-
</MenuItem>
40-
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.About}}">
41-
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Email}}">
42-
<MenuItem.Icon>
43-
<Path Data="{StaticResource EmailGeometry}" Fill="{DynamicResource PrimaryBrush}"/>
44-
</MenuItem.Icon>
45-
</MenuItem>
46-
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Chatroom}}">
47-
<MenuItem.Icon>
48-
<Path Data="{StaticResource GitterGeometry}" Fill="#e52e64"/>
49-
</MenuItem.Icon>
50-
</MenuItem>
51-
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Blog}}">
52-
<MenuItem.Icon>
53-
<Path Data="{StaticResource CnblogsGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
54-
</MenuItem.Icon>
55-
</MenuItem>
56-
</MenuItem>
57-
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Contributors}}"/>
58-
</Menu>
59-
</ToolBar>
60-
</ToolBarTray>
58+
<MenuItem Header="{ex:Lang Key={x:Static langs:LangKeys.Contributors}}"/>
59+
</Menu>
60+
</ToolBar>
61+
</ToolBarTray>
62+
<ToolBarTray Orientation="Vertical" Margin="0,16,0,0">
63+
<ToolBar Padding="6" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}">
64+
<CheckBox IsChecked="True" Margin="0,10,0,0"/>
65+
<Separator Margin="0,10,0,0"/>
66+
<RadioButton Margin="0,10,0,0"/>
67+
<StackPanel>
68+
<RadioButton IsChecked="True" Margin="0,10,0,0"/>
69+
<RadioButton Margin="0,10,0,0"/>
70+
</StackPanel>
71+
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}" Margin="0,10,0,0"/>
72+
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}" Margin="0,10,0,0" Style="{StaticResource ButtonPrimary}"/>
73+
</ToolBar>
74+
<ToolBar Band="1" Padding="6" Header="{ex:Lang Key={x:Static langs:LangKeys.Title}}">
75+
<CheckBox IsChecked="True" Margin="0,10,0,0"/>
76+
<Separator Margin="0,10,0,0"/>
77+
<RadioButton Margin="0,10,0,0"/>
78+
<StackPanel>
79+
<RadioButton IsChecked="True" Margin="0,10,0,0"/>
80+
<RadioButton Margin="0,10,0,0"/>
81+
</StackPanel>
82+
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}" Margin="0,10,0,0"/>
83+
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}" Margin="0,10,0,0" Style="{StaticResource ButtonPrimary}"/>
84+
</ToolBar>
85+
</ToolBarTray>
86+
</StackPanel>
6187
</hc:TransitioningContentControl>
6288
</UserControl>

src/Shared/HandyControl_Shared/Themes/Basic/Geometries.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
<Geometry o:Freeze="True" x:Key="FatalGeometry">M716.8 375.466667l34.133333 34.133333c17.066667 17.066667 42.666667 17.066667 59.733334 0 17.066667-17.066667 17.066667-42.666667 0-59.733333l-34.133334-34.133334 34.133334-34.133333c17.066667-17.066667 17.066667-42.666667 0-59.733333-17.066667-17.066667-42.666667-17.066667-59.733334 0l-34.133333 34.133333-34.133333-34.133333c-17.066667-17.066667-42.666667-17.066667-59.733334 0-17.066667 17.066667-17.066667 42.666667 0 59.733333l34.133334 34.133333-34.133334 34.133334c-17.066667 17.066667-17.066667 42.666667 0 59.733333 17.066667 17.066667 42.666667 17.066667 59.733334 0l34.133333-34.133333z m-426.666667 0l34.133334 34.133333c17.066667 17.066667 42.666667 17.066667 59.733333 0 17.066667-17.066667 17.066667-42.666667 0-59.733333l-34.133333-34.133334 34.133333-34.133333c17.066667-17.066667 17.066667-42.666667 0-59.733333-17.066667-17.066667-42.666667-17.066667-59.733333 0l-34.133334 34.133333-34.133333-34.133333c-17.066667-17.066667-42.666667-17.066667-59.733333 0-17.066667 17.066667-17.066667 42.666667 0 59.733333l34.133333 34.133333-34.133333 34.133334c-17.066667 17.066667-17.066667 42.666667 0 59.733333 17.066667 17.066667 42.666667 17.066667 59.733333 0l34.133333-34.133333zM0 85.333333c0-51.2 42.666667-85.333333 85.333333-85.333333h853.333334c51.2 0 85.333333 42.666667 85.333333 85.333333v853.333334c0 51.2-42.666667 85.333333-85.333333 85.333333H85.333333c-51.2 0-85.333333-42.666667-85.333333-85.333333V85.333333z m512 469.333334c-136.533333 0-230.4 68.266667-290.133333 196.266666-8.533333 17.066667 0 42.666667 17.066666 59.733334s42.666667 0 59.733334-17.066667c51.2-93.866667 110.933333-145.066667 221.866666-145.066667 102.4 0 170.666667 51.2 221.866667 145.066667 8.533333 17.066667 34.133333 25.6 59.733333 17.066667 17.066667-8.533333 25.6-34.133333 17.066667-59.733334-76.8-128-170.666667-196.266667-307.2-196.266666z</Geometry>
5353
<Geometry o:Freeze="True" x:Key="AskGeometry">M512 0 30.11843 240.941297l0 542.117406 481.88157 240.941297 481.88157-240.941297L993.88157 240.941297 512 0zM575.776472 768.799969 460.188012 768.799969 460.188012 656.222073l115.588459 0L575.776472 768.799969zM623.335603 509.329685c-52.375829 36.723353-59.600363 55.988096-59.600363 84.885211l0 19.866447L468.616977 614.081343l0-26.489278c0-45.754021 13.846342-80.67124 61.406497-116.791866 46.957428-36.723353 57.79423-62.0082 57.79423-84.282484 0-25.284848-21.67258-54.181962-55.386393-54.181962-42.743457 0-70.436142 26.489278-82.477374 85.486914l-105.956088-21.67258c24.683144-111.976192 82.477374-157.127486 205.289345-157.127486 98.12985 0 157.72919 63.212631 157.72919 131.842639C707.017407 423.240044 688.956071 461.76953 623.335603 509.329685z</Geometry>
5454
<Geometry o:Freeze="True" x:Key="AllGeometry">M 721.005 638.949 C 758.74 638.949 789.333 669.56 789.333 707.312 C 789.333 745.047 758.74 775.657 721.005 775.657 C 683.253 775.657 652.66 745.047 652.66 707.312 C 652.66 669.56 683.253 638.949 721.005 638.949 Z M 512.017 638.949 C 549.77 638.949 580.38 669.56 580.38 707.312 C 580.38 745.047 549.77 775.657 512.017 775.657 C 474.265 775.657 443.672 745.047 443.672 707.312 C 443.672 669.56 474.265 638.949 512.017 638.949 Z M 303.029 638.949 C 340.781 638.949 371.392 669.56 371.392 707.312 C 371.392 745.047 340.781 775.657 303.029 775.657 C 265.277 775.657 234.667 745.047 234.667 707.312 C 234.667 669.56 265.277 638.949 303.029 638.949 Z M 721.005 443.655 C 758.74 443.655 789.333 474.265 789.333 512.017 C 789.333 549.769 758.74 580.363 721.005 580.363 C 683.253 580.363 652.66 549.769 652.66 512.017 C 652.66 474.265 683.253 443.655 721.005 443.655 Z M 512.017 443.655 C 549.77 443.655 580.38 474.265 580.38 512.017 C 580.38 549.769 549.77 580.363 512.017 580.363 C 474.265 580.363 443.672 549.769 443.672 512.017 C 443.672 474.265 474.265 443.655 512.017 443.655 Z M 303.029 443.655 C 340.781 443.655 371.392 474.265 371.392 512.017 C 371.392 549.769 340.781 580.363 303.029 580.363 C 265.277 580.363 234.667 549.769 234.667 512.017 C 234.667 474.265 265.277 443.655 303.029 443.655 Z M 721.005 248.343 C 758.74 248.343 789.333 278.953 789.333 316.688 C 789.333 354.44 758.74 385.051 721.005 385.051 C 683.253 385.051 652.66 354.44 652.66 316.688 C 652.66 278.953 683.253 248.343 721.005 248.343 Z M 512.017 248.343 C 549.77 248.343 580.38 278.953 580.38 316.688 C 580.38 354.44 549.77 385.051 512.017 385.051 C 474.265 385.051 443.672 354.44 443.672 316.688 C 443.672 278.953 474.265 248.343 512.017 248.343 Z M 303.029 248.343 C 340.781 248.343 371.392 278.953 371.392 316.688 C 371.392 354.44 340.781 385.051 303.029 385.051 C 265.277 385.051 234.667 354.44 234.667 316.688 C 234.667 278.953 265.277 248.343 303.029 248.343 Z</Geometry>
55-
<Geometry o:Freeze="True" x:Key="DragGeometry">M384 896C384 825.307552 440.814697 768 512 768 582.692448 768 640 824.814694 640 896 640 966.692448 583.185303 1024 512 1024 441.307552 1024 384 967.185306 384 896ZM384 512C384 441.307552 440.814697 384 512 384 582.692448 384 640 440.814697 640 512 640 582.692448 583.185303 640 512 640 441.307552 640 384 583.185303 384 512ZM384 128C384 57.307552 440.814697 0 512 0 582.692448 0 640 56.814697 640 128 640 198.692448 583.185303 256 512 256 441.307552 256 384 199.185303 384 128Z</Geometry>
55+
<Geometry o:Freeze="True" x:Key="DragVerticalGeometry">M2,12 C3.1045694,12 4,12.895431 4,14 4,15.104569 3.1045694,16 2,16 0.89543051,16 0,15.104569 0,14 0,12.895431 0.89543051,12 2,12 z M2,6 C3.1045694,6 4,6.8954306 4,8 4,9.1045694 3.1045694,10 2,10 0.89543051,10 0,9.1045694 0,8 0,6.8954306 0.89543051,6 2,6 z M2,0 C3.1045694,0 4,0.89543056 4,2 4,3.1045694 3.1045694,4 2,4 0.89543051,4 0,3.1045694 0,2 0,0.89543056 0.89543051,0 2,0 z</Geometry>
56+
<Geometry o:Freeze="True" x:Key="DragHorizontalGeometry">M14,0 C15.104569,0 16,0.89543051 16,2 16,3.1045694 15.104569,4 14,4 12.895431,4 12,3.1045694 12,2 12,0.89543051 12.895431,0 14,0 z M8,0 C9.1045694,0 10,0.89543051 10,2 10,3.1045694 9.1045694,4 8,4 6.8954306,4 6,3.1045694 6,2 6,0.89543051 6.8954306,0 8,0 z M2,0 C3.1045694,0 4,0.89543051 4,2 4,3.1045694 3.1045694,4 2,4 0.89543056,4 0,3.1045694 0,2 0,0.89543051 0.89543056,0 2,0 z</Geometry>
5657
<Geometry o:Freeze="True" x:Key="DropperGeometry">M798.165333 97.834667a42.624 42.624 0 0 0-60.330666 0l-140.629334 140.629333-55.381333-55.296-60.330667 60.330667 55.381334 55.296-353.706667 353.706666a42.709333 42.709333 0 0 0-11.221333 19.84l-42.666667 170.666667a42.538667 42.538667 0 0 0 51.712 51.712l170.666667-42.666667c7.509333-1.877333 14.378667-5.76 19.84-11.221333l353.792-353.792 55.210666 55.125333 60.330667-60.330666-55.210667-55.125334 140.544-140.544a42.624 42.624 0 0 0 0-60.330666l-128-128zM319.488 772.138667l-90.197333 22.570666 22.570666-90.197333 345.386667-345.386667 67.669333 67.584-345.429333 345.429334z</Geometry>
5758

5859
</ResourceDictionary>

0 commit comments

Comments
 (0)