Hi,
In the 11.1 XamPivotGrid when i wanted to change properties of the fielditem i used to change the style of the "Style TargetType="igPivotPrim:FieldItemControl".
However, in 11.2 it is not updating. how can i change it? have you modified its name?
Thanks,
Nazha
Thanks it worked.
One note: In the sampe you have to change the server, database and cube, because i targeted one invisible from public network. Excuse me for that.
Did you took all other static resources which are targeted in ExpandableFieldItemControl and FilterFieldItemControl styles? like CheckBoxStyle and XamTreeStyle1. Having in mind that these styles use other static resources they have to be included too in the dictionary. I only deleted CheckBoxStyle and XamTreeStyle1 styles not to do the procedure described above and this is what i see when drag hierarchy in pivot:
Transperent and no 'x' button. The tree is not shown correctly because of intentionally delete style as i mentioned.
I have attached the sample too.
Regards,
Mircho
I took the Style of the "ExpandableFieldItemControlKey" and the "FilterFieldItemControl" from the IG.xamPivotGrid.xaml and changed the following in the "ExpandableFieldItemControlKey".
I made the background transparent and removed the close button and the draggable feature. However the layout doesn't change. If i remove "igPivot:TemplatedParentHelper.TemplatedParent="{Binding RelativeSource={RelativeSource TemplatedParent}}">" in the Popup section down the layout changes as desired but then i have issues with the popup itself when clicked. how can i change the layout without facing any issues?
Note: I am not assigning any theme to my application.
<Style x:Key="ExpandableFieldItemControlKey" TargetType="igPivotPrim:ExpandableFieldItemControl">
<Setter Property="FontSize" Value="11" />
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="igPivotPrim:ExpandableFieldItemControl">
<Grid x:Name="Root" Background="Transparent">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="3">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ToggleButton x:Name="DropDownToggle" Style="{StaticResource FilterDropdownToggle}"
Cursor="Hand"
IsThreeState="False" IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsExpanded, Mode=TwoWay}"
HorizontalAlignment="Stretch" Margin="0" BorderBrush="{TemplateBinding BorderBrush}"
VerticalContentAlignment="Stretch"
BorderThickness="{TemplateBinding BorderThickness}" HorizontalContentAlignment="Center">
<Path x:Name="clearFilterGlyphStroke" Width="11" Height="8" HorizontalAlignment="Center" VerticalAlignment="Center"
Data="M 0,0 C0,0 11,0 11,0 11,0 7,4 7,4 7,4 7,8 7,8 7,8 4,8 4,8 4,8 4,4 4,4 4,4 0,0 0,0 z" Stretch="Fill"
Stroke="{StaticResource DarkBrush1}" Fill="{StaticResource LightForegroundColor}" />
</Grid>
</ToggleButton>
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="70,0,0,0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
<Popup x:Name="Popup" Grid.Row="1" IsOpen="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsExpanded, Mode=TwoWay}">
<Grid x:Name="OriginalPopupChild" Width="Auto">
<Border x:Name="PopupBorder" Background="{StaticResource PopupBackgroundBrush}" VerticalAlignment="Top"
BorderBrush="{StaticResource GridBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
igPivot:TemplatedParentHelper.TemplatedParent="{Binding RelativeSource={RelativeSource TemplatedParent}}">
<Border.Effect>
<DropShadowEffect Direction="270" Opacity="0.25" ShadowDepth="3"/>
</Border.Effect>
<ContentPresenter ContentTemplate="{TemplateBinding ExpansionAreaContentTemplate}"/>
<Border VerticalAlignment="Top" Grid.Row="1">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
<Button Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=StringSource.FilterTreeOkButtonText}" x:Name="OKButton" Margin="5" Width="70" Cursor="Hand">
<ig:Commanding.Command>
<igPivot:XamPivotGridCommandSource EventName="Click" CommandType="RefreshGrid"/>
</ig:Commanding.Command>
</Button>
<Button Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=StringSource.FilterTreeCancelButtonText}"
x:Name="CancelButton" Margin="5" Width="70" Cursor="Hand" >
<igPivot:XamTriggers.EventTriggers>
<igPivot:XamEventTrigger EventName="Click">
<igPivot:ExpandableFieldItemEventTrigger IsEnabled="True"/>
</igPivot:XamEventTrigger>
</igPivot:XamTriggers.EventTriggers>
</StackPanel>
</Border>
</Popup>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Hi Nazha,
There is a change in class hierarchy for fielditem controls in 11.2
Here is the class diagram:
Here is sample image:
M. Yovchev