How to change pivotGrid Resource String ?
Hi,
I resolved the problem. Thank you for all post.
Hi Yanko,
Thank you for fast response.
Hi Resul,
It seems that everything is right. May you attach a sample application with your customized XamPivotGrid in order to try to apply the resource string on my side.
Looking forward to hearing from you.
I add resx file SampleBPivot.PivotGridResourceStringsSample.resx in to my project. I registered before MainWindow. Code is like below.
(BPivotGrid is inheritance from XamlPivotGrid)
namespace SampleBPivot { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary>
public MainWindow() { //XamPivotGrid.RegisterResources("SampleBPivot.Resource1", typeof(MainWindow).Assembly); BPivotGrid.RegisterResources("SampleBPivot.PivotGridResourceStringsSample", typeof(MainWindow).Assembly); InitializeComponent();
}
I got this error. 'The invocation of the constructor on type 'SampleBPivot.MainWindow' that matches the specified binding constraints
threw an exception.' Line number '4' and line position '5'.
Hello Resul,
Thank you for your feedback. The approach that you would like to apply is valid only for the WPF specific controls. The XamPivotGird is a shared control and in order to customize its resource strings you need to create a resource file as described in the section ‘Registering the Customized Resource Files’ in the link from my previous post. After create the .resx file you need to load it before the ‘InitializeComponent’ method in the ‘MianWindow’ constructor like e.g. :
XamPivotGrid.RegisterResources("PivotGridInCSharp.PivotGridResourceStringsSample", typeof(MainWindow).Assembly);
where PivotGridInCSharp is the default namespace of your application( in this case of mine).
Let me know, if you need any further assistance on this matter.