Created
February 13, 2013 17:39
-
-
Save JustinBeckwith/4946453 to your computer and use it in GitHub Desktop.
snippets
This file contains 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
<DataTemplate | |
x:Key="SnippetItemInGallery"> | |
<Grid> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition | |
Width="*" /> | |
<ColumnDefinition | |
Width="Auto" /> | |
</Grid.ColumnDefinitions> | |
<StackPanel | |
Orientation="Horizontal" | |
Grid.Column="0"> | |
<TextBlock | |
Text="{Binding Path=Name}" | |
Margin="2,3,2,0" | |
ToolTip="{Binding Path=Text}" /> | |
</StackPanel> | |
<Button | |
x:Name="EditButton" | |
Visibility="Hidden" | |
Grid.Column="1" | |
Command="{Binding Path=EditSnippet}">...</Button> | |
</Grid> | |
<DataTemplate.Triggers> | |
<MultiDataTrigger> | |
<MultiDataTrigger.Conditions> | |
<Condition | |
Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource AncestorType=Grid}}" | |
Value="true" /> | |
<Condition | |
Binding="{Binding Path=CanEdit}" | |
Value="true" /> | |
</MultiDataTrigger.Conditions> | |
<Setter | |
TargetName="EditButton" | |
Property="Visibility" | |
Value="Visible" /> | |
</MultiDataTrigger> | |
</DataTemplate.Triggers> | |
</DataTemplate> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment