Hi,
<Style x:Key="GridViewToggleButtonStyle1" TargetType="{x:Type telerik:GridViewToggleButton}">
<Setter Property="ArrowTemplate">
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:GridViewToggleButton}">
<Border Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Border Height="9">
<Grid>
<Path x:Name="plus" Data="M0.5,0.5L6.5,3.5 0.5,6.5z" Fill="White" Height="9" Margin="{TemplateBinding Padding}" Stretch="Fill" Stroke="#FF9D9D9D" StrokeThickness="{TemplateBinding BorderThickness}" Width="6"/>
<Path x:Name="minus" Data="M6.5,0.5L6.5,6.5 0.5,6.5z" Fill="#FF595959" Height="7" Margin="{TemplateBinding Padding}" Opacity="0" Stretch="Fill" Stroke="Black" StrokeThickness="{TemplateBinding BorderThickness}" Width="7"/>
</Grid>
</Border>
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonUp">
<i:InvokeCommandAction Command="{Binding ElementName=LayoutRootGrid,Path=DataContext.ClickCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Border>
<ControlTemplate.Triggers>
<Trigger SourceName="plus" Property="Opacity" Value="1">
<Setter Property="Background" Value="Red"/>
</Trigger>
<Trigger SourceName="plus" Property="Opacity" Value="0">
<Setter Property="Background" Value="Yellow"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Here is the point
<!--<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonUp">
<i:InvokeCommandAction Command="{Binding ElementName=LayoutRootGrid,Path=DataContext.ClickCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>-->
it should work but not working
I want to execute ViewModel's ClickCommand when users expand and collapse. Take a look at the attached file
<Style x:Key="GridViewToggleButtonStyle1" TargetType="{x:Type telerik:GridViewToggleButton}">
<Setter Property="ArrowTemplate">
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:GridViewToggleButton}">
<Border Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Border Height="9">
<Grid>
<Path x:Name="plus" Data="M0.5,0.5L6.5,3.5 0.5,6.5z" Fill="White" Height="9" Margin="{TemplateBinding Padding}" Stretch="Fill" Stroke="#FF9D9D9D" StrokeThickness="{TemplateBinding BorderThickness}" Width="6"/>
<Path x:Name="minus" Data="M6.5,0.5L6.5,6.5 0.5,6.5z" Fill="#FF595959" Height="7" Margin="{TemplateBinding Padding}" Opacity="0" Stretch="Fill" Stroke="Black" StrokeThickness="{TemplateBinding BorderThickness}" Width="7"/>
</Grid>
</Border>
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonUp">
<i:InvokeCommandAction Command="{Binding ElementName=LayoutRootGrid,Path=DataContext.ClickCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Border>
<ControlTemplate.Triggers>
<Trigger SourceName="plus" Property="Opacity" Value="1">
<Setter Property="Background" Value="Red"/>
</Trigger>
<Trigger SourceName="plus" Property="Opacity" Value="0">
<Setter Property="Background" Value="Yellow"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Here is the point
<!--<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonUp">
<i:InvokeCommandAction Command="{Binding ElementName=LayoutRootGrid,Path=DataContext.ClickCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>-->
it should work but not working
I want to execute ViewModel's ClickCommand when users expand and collapse. Take a look at the attached file