46,245 questions
How Do I input Carousel onto a sidebar?
Mark Mather
156
Reputation points
I have a sidebar that I was helped with, I Want to add a website carousel of open tabs?
Example:
https://help.syncfusion.com/uwp/carousel/getting-started
here is a screenshot of the sidebar:
I also provided the code below:
<Grid x:Name="sidepanel" Width="300" HorizontalAlignment="Left" Margin="0,-1,0,135">
<Grid.RenderTransform>
<TranslateTransform x:Name="myTransform" X="-500" Y="100" />
</Grid.RenderTransform>
<TextBox Text="Open Tabs" Margin="0,0,10,0">
<TextBox.Background>
<AcrylicBrush FallbackColor="#FF818181"/>
</TextBox.Background>
</TextBox>
</Grid>
</Grid>
and:
<Page.Resources>
<!--animation to hide the panel-->
<Storyboard x:Name="myStoryboard">
<DoubleAnimation
Storyboard.TargetName="myTransform"
Storyboard.TargetProperty="X"
From="0" To="-500" Duration="0:0:1" />
</Storyboard>
<!--animation to show the panel-->
<Storyboard x:Name="myStoryboard2">
<DoubleAnimation
Storyboard.TargetName="myTransform"
Storyboard.TargetProperty="X"
From="-500" To="0" Duration="0:0:1" />
</Storyboard>
</Page.Resources>
and:
public bool IsOpen = false;
private void Open_Panel_Click(object sender, RoutedEventArgs e)
{
if (!IsOpen)
{
myStoryboard2.Begin();
IsOpen = !IsOpen;
}
else
{
myStoryboard.Begin();
IsOpen = !IsOpen;
}
}
Community Center | Not monitored
Sign in to answer