-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: Change isdragging opacity to animation #56
Comments
Stupid code inside github comments :( I am unable to see your code that you use. Could you put it in http://pastebin.com/ and then provide a link by chance? |
Please, provide code. This blinking is really annoying. |
Ok, I managed this using next code (please notice that I used Dragablz with MaterialDesignInXamlToolkit) <dragablz:TabablzControl>
<dragablz:TabablzControl.ItemContainerStyle>
<Style TargetType="{x:Type dragablz:DragablzItem}"
BasedOn="{StaticResource MaterialDesignDragableTabItemVerticalStyle}">
<Style.Triggers>
<Trigger Property="IsDragging" Value="True">
<Setter Property="Opacity" Value=".87" />
</Trigger>
<Trigger Property="IsSiblingDragging" Value="True">
<Setter Property="Opacity" Value=".95" />
</Trigger>
</Style.Triggers>
</Style>
</dragablz:TabablzControl.ItemContainerStyle>
...
</dragablz:TabablzControl> |
Sorry about the code, I never got any indication that this thread was responded to. |
This is not really an issue but a suggestion.
Currently the opacity is changed on dragging of tabs to .95 on the tab dragged and .5 on the siblings.
This causes the tabs to "blink" when clicking on them to change tab.
To avoid this blinking effect, you can set the opacity as an animation instead with ie a duration of 0:0:.2 and begintime to 0:0:0.1.
This removes the blinkeffect and gives it a subtle opacityanimation.
Here's the code I use:
<Style.Resources> <Storyboard x:Key="IsDraggingSB"> <DoubleAnimation Storyboard.TargetProperty="Opacity" To=".95" Duration="0:0:0.2" BeginTime="0:0:0.1"/> </Storyboard> <Storyboard x:Key="IsSiblingDraggingSB"> <DoubleAnimation Storyboard.TargetProperty="Opacity" To=".5" Duration="0:0:0.2" BeginTime="0:0:0.1"/> </Storyboard> </Style.Resources> <Style.Triggers> <Trigger Property="IsDragging" Value="True"> <Trigger.EnterActions> <BeginStoryboard Name="BeginIsDraggingSB" Storyboard="{StaticResource IsDraggingSB}"/> </Trigger.EnterActions> <Trigger.ExitActions> <RemoveStoryboard BeginStoryboardName="BeginIsDraggingSB"/> </Trigger.ExitActions> </Trigger> <Trigger Property="IsSiblingDragging" Value="True"> <Trigger.EnterActions> <BeginStoryboard Name="BeginIsSiblingDraggingSB" Storyboard="{StaticResource IsSiblingDraggingSB}"/> </Trigger.EnterActions> <Trigger.ExitActions> <RemoveStoryboard BeginStoryboardName="BeginIsSiblingDraggingSB"/> </Trigger.ExitActions> </Trigger>
The text was updated successfully, but these errors were encountered: