Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
605
custom PivotCell style using a BasedOn
posted

Hi,

I'd like to create a custom style for the PivotCellControl style.  We are using the Infragistics themes, so when we override the style we need to supply a BasedOn such as to not lose the infragistics elements.  Typically, eg. for a XamNumericEditor, we would do something like this:

<Style TargetType="{x:Type igEditors:XamNumericEditor}"
BasedOn="{x:Static igThemes:EditorsOffice2013.XamNumericEditor}">

I'm searching around the igThemes namespace using intellisense for the PivotCellControl but can't find it anywhere.  Do you know where it is defined?  In other words, I'd like to do:

<Style x:Key="LocalPivotCellStyle" TargetType="{x:Type ig:PivotCellControl}"
BasedOn="{x:Static igThemes:??????}">

We can't really use the BasedOn="{StaticResource {x:Type igPivot:PivotCellControl}}" trick because we are using Dynamic Resources and can change the style at runtime.  thank you

Parents
  • 34430
    Verified Answer
    Offline posted

    Hello bcarpent,

    In this case, the {x:Static igThemes:EditorsOffice2013.XamNumericEditor} resource key that you are basing off of is interfacing directly with the Infragistics Theme Manager, which exposes themes for the WPF-specific controls in the Infragistics for WPF control suite. Some of our controls are known as "shared" controls, as they have a shared code-base between WPF and Silverlight. You can find a full list of the WPF-specific and Shared controls at the following links:

    WPF-Specific: http://help.infragistics.com/doc/WPF/2016.1/CLR4.0/?page=WPF_Specific_Controls_Landing_Page.html.

    Shared: http://help.infragistics.com/doc/WPF/2016.1/CLR4.0/?page=Shared_XAML_Controls.html.

    The Shared controls unfortunately do not currently have this resource key functionality exposed. The XamPivotGrid is a shared control, and as such there are no {x:Static} resource key references for the XamPivotGrid. Instead, I would recommend that you include the default style for the theme that you are looking to base off of for your PivotCellControl element. These themes can commonly be found at the following directory:

    C:\Program Files (x86)\Infragistics\<your version here>\WPF\Themes

    At the above directory, you should see a folder for each of the themes that are exposed for the Shared Infragistics controls. Inside of each of those folders, you will find a XAML file in the format of <ThemeName>.<ControlName>, and if you navigate to the XamPivotGrid one, you should find the default style for the PivotCellControl for that particular theme. By including it in your project and giving it an x:Key, you can then base other styles off of it.

    If you would like to see the Resource key functionality included for the Infragistics shared controls, I would recommend suggesting a new product idea for this functionality at http://ideas.infragistics.com. This product ideas site will place you in direct communication with our product management teams who plan and prioritize upcoming features and development based on community and user feedback.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer

Reply Children
No Data