GooeyEffect
Attributes
Name |
PrimaryTimeLineFromX |
PrimaryTimeLineToX |
SecondaryTimeLineFromX |
SecondaryTimeLineToX |
PrimaryTimeLineFromY |
PrimaryTimeLineToY |
SecondaryTimeLineFromY |
SecondaryTimeLineToY |
Duration |
Easing |
PrimaryFill |
SecondaryFill |
BlurAmount |
PrimaryRadius |
SecondaryRadius |
Example
Attributes
Name |
TimeLineFrom |
TimeLineTo |
SizeTimeLineFrom |
SizeTimeLineTo |
BlurAmount |
Fill |
Bubble |
Duration |
SizeDuration |
BeginTime |
SizeBeginTime |
X |
Y |
W |
H |
Example
1
| <wuc:GooeyFooterEffect />
|
Attributes
Name |
Content |
Expanded |
Distance |
BlurAmount |
ItemsPosition |
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| <wuc:GooeyButton x:Name="gooeyButton" HorizontalAlignment="Center" VerticalAlignment="Center" Invoked="gooeyButton_Invoked" ItemInvoked="gooeyButton_ItemInvoked" ItemsSource="{x:Bind strings}"> <wuc:GooeyButton.Content> <SymbolIcon Symbol="Add" /> </wuc:GooeyButton.Content> <wuc:GooeyButton.ItemTemplate> <DataTemplate> <SymbolIcon Symbol="{Binding}" /> </DataTemplate> </wuc:GooeyButton.ItemTemplate> </wuc:GooeyButton>
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
| private readonly Random rnd = new(); private ObservableCollection<Symbol> strings { get; }
public Init() { strings = new ObservableCollection<Symbol> { Symbol.AddFriend, Symbol.Forward, Symbol.Share }; }
private void gooeyButton_Invoked(object sender, GooeyButton.GooeyButtonInvokedEventArgs args) { Debug.WriteLine("Invoked"); }
private void gooeyButton_ItemInvoked(object sender, GooeyButton.GooeyButtonItemInvokedEventArgs args) { if (args.Item is Symbol symbol) { if (symbol == Symbol.AddFriend) { if (strings.Count == 3) { strings.Add(Symbol.Home); gooeyButton.Distance += 20; } else { strings.RemoveAt(3); gooeyButton.Distance -= 20; } } else if (symbol == Symbol.Forward) { var pos = (int)gooeyButton.ItemsPosition + 1; if (pos == 4) pos = 0; gooeyButton.ItemsPosition = (GooeyButtonItemsPosition)pos; } else if (symbol == Symbol.Share) { gooeyButton.Distance = rnd.Next(80, 300); } }
Debug.WriteLine(args.Item.ToString()); }
|
Demo
you can run demo and see this feature.