Hi,
I need some help in figuring out what is causing this ...the "OK" & "Cancel" text overlapping the checkmark and cross (X) marks in the image below... This is the Summary Calc editor UI and those two controls Buttons are called RowSummaryOkButton and RowSummaryCancelButton.
Any help/info would be appreciated.
Thank you
Srikar
Hi Srikar,
Did you remplate that summary chooser control? When I have the theme set to MetroDark and I open the summary chooser dropdown I only see the checkmark and X buttons. Here is what it looks like:
I did not retemplate the "summary chooser" control (can you tell me the exact name of this control?), however I did retemplate SummaryResultPresenter and SummaryResultsPresenter.
<Style TargetType="{x:Type igd:SummaryResultsPresenter}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igd:SummaryResultsPresenter}"> <Grid> <ItemsControl x:Name="SummaryItems" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" ItemsSource="{TemplateBinding SummaryResults}" /> </Grid> </ControlTemplate> </Setter.Value> </Setter>
</Style> <Style TargetType="{x:Type igd:SummaryResultPresenter}"> <Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igd:SummaryResultPresenter}" > <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Padding="{TemplateBinding Padding}" ToolTip="{Binding Path=SummaryResult.ToolTipResolved, RelativeSource={RelativeSource TemplatedParent}}"> <TextBlock HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Text="{Binding Path=SummaryResult.DisplayTextAsync, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource PrefixRemover}}" /> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style>
I don't really know if it is a bug or not because I wasn't able to reproduce this issue. If you look at my earlier post you can see the screenshot I took showing the behavior that I see. I was using 15.1 but that shouldn't matter as the XamDataGrid code/themes for 15.1 are the same used for 14.2. Can you reproduce this issue if you run my sample on your machine? If you can modify my sample to reproduce the issue and re-attach it here I can take a look to see if it is a bug or not.
Thank you and sorry for not being able to get back to you earlier.
I looked up the style you mentioned and the SummaryButton's template has two buttons RowSummaryOkButton (with Content = "Ok") and RowSummaryCancelButton (with Content = "Cancel").
We are on version 2014.2.
Is this a bug? I am pasting the relevant part of template here. Removing this "Content" property fixed the issue am seeing.
<Button x:Name="RowSummaryOkButton" Width="30" Height="30" Content="Ok" IsDefault="True" Margin="0,0,5,0" Style="DynamicResource {ComponentResourceKey {x:Type igDP:XamDataGrid}, RowSummaryOkButton}}" />
<Button x:Name="RowSummaryCancelButton" Width="30" Height="30" Content="Cancel" IsCancel="True" Style="DynamicResource {ComponentResourceKey {x:Type igDP:XamDataGrid}, RowSummaryCancelButton}}" />
Let me know if you have any further questions on this matter.
The contents of the popup are defined in the SummaryButton ControlTemplate. You can find the template if you open the DefaultStyles folder in the Infragistics installation directory (C:\Program Files (x86)\Infragistics\2015.1\WPF\DefaultStyles\DataPresenter). In the DataPresenterMetroDark_Express.xaml resource dictionary there is a style for the SummaryButton. Inside the ControlTemplate there is a Popup called PART_Popup and this is where the contents of that summary chooser are defined. You can see the buttons there as well.