Skip to content

Commit 79b32d5

Browse files
committed
feat: add ConfettiCannon.
1 parent 94aa32c commit 79b32d5

File tree

13 files changed

+889
-13
lines changed

13 files changed

+889
-13
lines changed

README-cn.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,17 @@ Step 4: 开始编码
205205

206206
## 最新示例
207207

208+
### ConfettiCannon
209+
210+
![ConfettiCannon](https://gitee.com/handyorg/HandyOrgResource/raw/master/HandyControl/Resources/ConfettiCannon.gif)
211+
208212
### Watermark
209213

210-
![Watermark](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/Watermark.png)
214+
![Watermark](https://gitee.com/handyorg/HandyOrgResource/raw/master/HandyControl/Resources/Watermark.png)
211215

212216
### AutoCompleteTextBox
213217

214-
![AutoCompleteTextBox](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/AutoCompleteTextBox.gif)
218+
![AutoCompleteTextBox](https://gitee.com/handyorg/HandyOrgResource/raw/master/HandyControl/Resources/AutoCompleteTextBox.gif)
215219

216220
### ElementGroup
217221

@@ -221,12 +225,12 @@ Step 4: 开始编码
221225

222226
![UniformSpacingPanel](https://gitee.com/handyorg/HandyOrgResource/raw/master/HandyControl/Resources/UniformSpacingPanel.png)
223227

228+
## 历史发布
229+
224230
### FlexPanel
225231

226232
![FlexPanel](https://gitee.com/handyorg/HandyOrgResource/raw/master/HandyControl/Resources/FlexPanel.gif)
227233

228-
## 历史发布
229-
230234
### CheckComboBox
231235

232236
![CheckComboBox](https://gitee.com/handyorg/HandyOrgResource/raw/master/HandyControl/Resources/CheckComboBox.png)

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ Step 4: Enjoy coding
193193

194194
## Latest examples
195195

196+
### ConfettiCannon
197+
198+
![ConfettiCannon](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/ConfettiCannon.gif)
199+
196200
### Watermark
197201

198202
![Watermark](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/Watermark.png)
@@ -209,12 +213,12 @@ Step 4: Enjoy coding
209213

210214
![UniformSpacingPanel](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/UniformSpacingPanel.png)
211215

216+
## History publication
217+
212218
### FlexPanel
213219

214220
![FlexPanel](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/FlexPanel.gif)
215221

216-
## History publication
217-
218222
### CheckComboBox
219223

220224
![CheckComboBox](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/CheckComboBox.png)

src/Shared/HandyControlDemo_Code/HandyControlDemo_Code.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@
101101
<Resource Include="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\CompareSliderDemo.xaml">
102102
<Link>UserControl\Controls\CompareSliderDemo.xaml</Link>
103103
</Resource>
104+
<Resource Include="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\ConfettiCannonDemo.xaml">
105+
<Link>UserControl\Controls\ConfettiCannonDemo.xaml</Link>
106+
</Resource>
104107
<Resource Include="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\CoverFlowDemo.xaml">
105108
<Link>UserControl\Controls\CoverFlowDemo.xaml</Link>
106109
</Resource>
@@ -495,6 +498,10 @@
495498
<Link>UserControl\Controls\CompareSliderDemo.xaml.cs</Link>
496499
<DependentUpon>CompareSliderDemo.xaml</DependentUpon>
497500
</Resource>
501+
<Resource Include="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\ConfettiCannonDemo.xaml.cs">
502+
<Link>UserControl\Controls\ConfettiCannonDemo.xaml.cs</Link>
503+
<DependentUpon>ConfettiCannonDemo.xaml</DependentUpon>
504+
</Resource>
498505
<Resource Include="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\CoverFlowDemo.xaml.cs">
499506
<Link>UserControl\Controls\CoverFlowDemo.xaml.cs</Link>
500507
<DependentUpon>CoverFlowDemo.xaml</DependentUpon>

src/Shared/HandyControlDemo_Shared/Data/DemoInfo.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"title": "Styles",
44
"selectedIndex": -1,
5-
"group": false,
5+
"group": false,
66
"demoItemList": [
77
[ "Brush", "BrushDemo", "Brush.Brush", "", "" ],
88
[ "Button", "ButtonDemo", "Brush.ButtonClick", "", "" ],
@@ -43,6 +43,7 @@
4343
"group": true,
4444
"demoItemList": [
4545
[ "FloatingBlock", "FloatingBlockDemo", "Brush.LikeFilled", "", "Interacting" ],
46+
[ "ConfettiCannon", "ConfettiCannonDemo", "Brush.Favorite", "1", "Interacting" ],
4647
[ "PropertyGrid", "PropertyGridDemo", "Brush.PropertyGridEditorPart", "", "DataEntry" ],
4748
[ "ImageSelector", "ImageSelectorDemo", "Brush.Image", "", "DataEntry" ],
4849
[ "ImageBlock", "ImageBlockDemo", "Brush.ImageStack", "", "DataDisplay" ],
@@ -79,7 +80,7 @@
7980
[ "Divider", "DividerDemo", "Brush.DottedSplitter", "", "Layout" ],
8081
[ "CirclePanel", "CirclePanelDemo", "Brush.ColorWheel", "", "Layout" ],
8182
[ "Grid", "GridDemo", "Brush.GridPane", "", "Layout" ],
82-
[ "FlexPanel", "FlexPanelDemo", "Brush.FlowLayoutPanel", "1", "Layout" ],
83+
[ "FlexPanel", "FlexPanelDemo", "Brush.FlowLayoutPanel", "", "Layout" ],
8384
[ "UniformSpacingPanel", "UniformSpacingPanelDemo", "Brush.IncreaseHorizontalSpacing", "1", "Layout" ],
8485
[ "RelativePanel", "RelativePanelDemo", "Brush.TransformRelative", "", "Layout" ],
8586
[ "WaterfallPanel", "WaterfallPanelDemo", "Brush.Panel", "", "Layout" ],
@@ -121,8 +122,8 @@
121122
"group": false,
122123
"demoItemList": [
123124
[ "HatchBrushGenerator", "HatchBrushGeneratorDemo", "Brush.DataGenerator", "", "" ],
124-
[ "Morphing_Animation", "GeometryAnimationDemo", "Brush.Animation", "", "" ],
125-
[ "Effects", "EffectsDemo", "Brush.Effects", "", "" ]
125+
[ "MorphingAnimation", "GeometryAnimationDemo", "Brush.Animation", "", "" ],
126+
[ "Effects", "EffectsDemo", "Brush.Effects", "", "" ],
126127
]
127128
}
128129
]

src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@
6464
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\AutoCompleteTextBoxDemo.xaml.cs">
6565
<DependentUpon>AutoCompleteTextBoxDemo.xaml</DependentUpon>
6666
</Compile>
67+
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\ConfettiCannonDemo.xaml.cs">
68+
<DependentUpon>ConfettiCannonDemo.xaml</DependentUpon>
69+
</Compile>
6770
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\ElementGroupDemo.xaml.cs">
6871
<DependentUpon>ElementGroupDemo.xaml</DependentUpon>
6972
</Compile>
@@ -551,6 +554,7 @@
551554
<SubType>Designer</SubType>
552555
<Generator>MSBuild:Compile</Generator>
553556
</Page>
557+
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\ConfettiCannonDemo.xaml" />
554558
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\ElementGroupDemo.xaml">
555559
<SubType>Designer</SubType>
556560
<Generator>MSBuild:Compile</Generator>

src/Shared/HandyControlDemo_Shared/Resources/Themes/Basic/Brushes.xaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<ImageDrawing o:Freeze="True" ImageSource="/HandyControlDemo;component/Resources/Img/cloud.png" Rect="0,0,157,157"/>
1212
</DrawingBrush.Drawing>
1313
</DrawingBrush>
14-
14+
1515
<DrawingBrush o:Freeze="True" x:Key="MainContentForegroundDrawingBrush" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0" RenderOptions.CachingHint="Cache" Viewport="0,0,16,16" ViewportUnits="Absolute" Stretch="None" TileMode="Tile">
1616
<DrawingBrush.Drawing>
1717
<GeometryDrawing o:Freeze="True" Brush="{DynamicResource MainContentForegroundBrush}">
@@ -57,7 +57,7 @@
5757
<GeometryDrawing o:Freeze="True" Brush="#f06632" Geometry="{StaticResource LogoGeometry}"/>
5858
</DrawingBrush.Drawing>
5959
</DrawingBrush>
60-
60+
6161
<DrawingBrush o:Freeze="True" x:Key="Brush.SortAscending">
6262
<DrawingBrush.Drawing>
6363
<DrawingGroup>
@@ -71,7 +71,7 @@
7171
</DrawingGroup>
7272
</DrawingBrush.Drawing>
7373
</DrawingBrush>
74-
74+
7575
<DrawingBrush o:Freeze="True" x:Key="Brush.Brush">
7676
<DrawingBrush.Drawing>
7777
<DrawingGroup>
@@ -1387,5 +1387,17 @@
13871387
</DrawingGroup>
13881388
</DrawingBrush.Drawing>
13891389
</DrawingBrush>
1390+
1391+
<DrawingBrush o:Freeze="True" x:Key="Brush.Favorite">
1392+
<DrawingBrush.Drawing>
1393+
<DrawingGroup>
1394+
<DrawingGroup.Children>
1395+
<GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
1396+
<GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M7.2729,-0.000199999999999534L5.6649,4.9998 -9.99999999997669E-05,4.9998 -9.99999999997669E-05,6.5148 4.2109,9.5218 2.1279,15.9998 3.8809,15.9998 7.9999,12.3378 12.1199,15.9998 13.8719,15.9998 11.7899,9.5218 15.9999,6.5148 15.9999,4.9998 10.3369,4.9998 8.7289,-0.000199999999999534z" />
1397+
<GeometryDrawing Brush="#FF424242" Geometry="F1M10.6143,9.1328L12.5003,14.9998 8.0003,10.9998 3.5003,14.9998 5.3863,9.1328 1.0003,5.9998 6.3933,5.9998 8.0013,0.9998 9.6073,5.9998 15.0003,5.9998z" />
1398+
</DrawingGroup.Children>
1399+
</DrawingGroup>
1400+
</DrawingBrush.Drawing>
1401+
</DrawingBrush>
13901402
<!--endregion-->
13911403
</ResourceDictionary>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<UserControl x:Class="HandyControlDemo.UserControl.ConfettiCannonDemo"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
hc:ConfettiCannon.Token="ConfettiCannonDemo"
5+
xmlns:hc="https://handyorg.github.io/handycontrol">
6+
<hc:TransitioningContentControl>
7+
<hc:ScrollViewer IsInertiaEnabled="True"
8+
Margin="32">
9+
<hc:UniformSpacingPanel Orientation="Vertical"
10+
Spacing="16">
11+
<Button Content="Basic Cannon"
12+
Click="ButtonBasicCannonOnClick" />
13+
<Button Content="Random Direction"
14+
Click="ButtonRandomDirectionOnClick" />
15+
<Button Content="Realistic Look"
16+
Click="ButtonRealisticLookClick" />
17+
<Button Content="Fireworks"
18+
Click="ButtonFireworksOnClick" />
19+
<Button Content="Stars"
20+
Click="ButtonStarsOnClick" />
21+
<Button Content="Snow"
22+
Click="ButtonSnowOnClick" />
23+
<Button Content="School Pride"
24+
Click="ButtonSchoolPrideOnClick" />
25+
<Button Content="Custom Canvas"
26+
Click="ButtonCustomCanvasOnClick" />
27+
<hc:ConfettiCannonContainer>
28+
<Border MinWidth="500"
29+
Height="300"
30+
Style="{StaticResource BorderRegion}" />
31+
</hc:ConfettiCannonContainer>
32+
</hc:UniformSpacingPanel>
33+
</hc:ScrollViewer>
34+
</hc:TransitioningContentControl>
35+
</UserControl>

0 commit comments

Comments
 (0)