Last active
March 15, 2020 00:27
-
-
Save aqwert/c7464fdaec28450968a0e0f0328a9238 to your computer and use it in GitHub Desktop.
Fuse SwipeItem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<SwipeItem ItemText="Swiped Item"> | |
<Panel ux:Template="Content" Height="50" Padding="10" Margin="10" > | |
<Rectangle Layer="Background" CornerRadius="8" Background="White"> | |
<Stroke Width="1" Color="{Resource DividerColor}"> </Stroke> | |
</Rectangle> | |
<Text Alignment="Center">Home Page Swipe</Text> | |
</Panel> | |
<StackPanel Orientation="Horizontal" ux:Template="ActionRight" > | |
<Panel Background="Green" Clicked="{editItem}" MinWidth="60" > | |
<Text Alignment="Center" Value="Edit" Color="1,1,1,1" Margin="10"/> | |
</Panel> | |
<Panel Background="Red" Clicked="{deleteItem}" MinWidth="60" > | |
<Text Alignment="Center" Value="Delete" Color="1,1,1,1" Margin="10"/> | |
</Panel> | |
</StackPanel> | |
<StackPanel Orientation="Horizontal" ux:Template="ActionLeft" > | |
<Panel Background="Blue" Clicked="{favItem}" MinWidth="60" > | |
<Text Alignment="Center" Value="Bookmark" Color="1,1,1,1" Margin="10"/> | |
</Panel> | |
</StackPanel> | |
</SwipeItem> | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Panel ux:Class="SwipeItem" ux:Name="self"> | |
<string ux:Property="ItemText" /> | |
<Panel Orientation="Horizontal" ux:Name="TheItem"> | |
<SolidColor Color="1,1,1,1" ux:Name="BackFill"/> | |
<Each TemplateSource="self" TemplateKey="Content" Count="1" /> | |
</Panel> | |
<Panel Alignment="Right" ux:Name="RightNode"> | |
<Each TemplateSource="self" TemplateKey="ActionRight" Count="1" /> | |
<Clicked> | |
<ToggleSwipeActive Target="RightSwipe"/> | |
</Clicked> | |
</Panel> | |
<SwipeGesture Direction="Left" LengthNode="RightNode" ux:Name="RightSwipe" Type="Active"/> | |
<SwipingAnimation Source="RightSwipe"> | |
<Move Target="TheItem" X="-1" RelativeTo="Size" RelativeNode="RightNode"/> | |
</SwipingAnimation> | |
<Panel Alignment="Left" ux:Name="LeftNode"> | |
<Each TemplateSource="self" TemplateKey="ActionLeft" Count="1" /> | |
<Clicked> | |
<ToggleSwipeActive Target="LeftSwipe"/> | |
</Clicked> | |
</Panel> | |
<SwipeGesture Direction="Right" LengthNode="LeftNode" ux:Name="LeftSwipe" Type="Active"/> | |
<SwipingAnimation Source="LeftSwipe"> | |
<Move Target="TheItem" X="1" RelativeTo="Size" RelativeNode="LeftNode"/> | |
</SwipingAnimation> | |
<LayoutAnimation> | |
<Move RelativeTo="PositionChange" Vector="1" Duration="0.25"/> | |
</LayoutAnimation> | |
<RemovingAnimation> | |
<Change TheItem.Opacity="0" Duration="0.15"/> | |
<Scale Factor="0.8" Duration="0.15"/> | |
</RemovingAnimation> | |
</Panel> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment