Pre loader

NumericTickLabel Template

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

Answered
0
0

Hi,

Our current ThemeManager setup from Infragistics is overriding my TickLabelStyle to have my NumericTickLabel TextBlocks to have the same foreground as the application wide theme, which is not what I want. I’m trying to get around this problem and so far I’ve tried setting a style targeting Textboxes under the AxisStyle, the TickLabelStyle, the SciChartSurface, even tried making an attached behaviour that searches for NumericTickLabels in the surface to set the colors manually. Nothing so far has worked.

I did notice however that my Annotations (Which I have templated to have TextBlocks instead of a TextBox) doesn’t have this problem and can keep their assigned color.

I’m now trying to template the NumericTickLabel to force it to have the colors that I want, but I can’t find how it was Templated in SciChart to begin with. Any other solution that might work would also be acceptable.

To get an idea of the problem here’s a blog post on Infragistics how this problem might be solved in other instances. My specific problem is talked about on Scenario 2

http://www.infragistics.com/community/blogs/andrew_smith/archive/2009/12/09/common-style-issues-when-using-the-theme-property.aspx

But as you can see, NumericTickLabels are not defined in the xaml hence, I can’t use the solution on the blog post.

I would appreciate any insight on this as I’ve been banging my head against the wall to solve this issue.

  • You must to post comments
Best Answer
0
0

H Andrew,

Might be Infragistics fault, but I did get around the problem by retemplating the NumericTickLabel and setting each of the TextBlocks their own styles. I don’t know what the “sinificant” TextBlock does though. This also means that I might have to template all the other TickLabels as well.

<ControlTemplate TargetType="{x:Type SciChart:NumericTickLabel}">
                                        <StackPanel Orientation="Horizontal">
                                            <TextBlock Text="{Binding Text}">
                                                <TextBlock.Style>
                                                    <Style TargetType="{x:Type TextBlock}"  BasedOn="{StaticResource {x:Type TextBlock}}">
                                                        <Setter Property="Foreground">
                                                            <Setter.Value>
                                                                <Binding Path="Data.GraphThemeOptions.LabelColor" Source="{StaticResource GraphViewModelProxy}" Converter="{StaticResource ColorToSolidBrushConverter}" UpdateSourceTrigger="PropertyChanged"/>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Style>
                                                </TextBlock.Style>
                                            </TextBlock>

                                            <TextBlock Text="{Binding Exponent}">
                                                <TextBlock.Style>
                                                    <Style TargetType="{x:Type TextBlock}"  BasedOn="{StaticResource {x:Type TextBlock}}">
                                                        <Setter Property="Foreground">
                                                            <Setter.Value>
                                                                <Binding Path="Data.GraphThemeOptions.LabelColor" Source="{StaticResource GraphViewModelProxy}" Converter="{StaticResource ColorToSolidBrushConverter}" UpdateSourceTrigger="PropertyChanged"/>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Style>
                                                </TextBlock.Style>
                                            </TextBlock>

                                        </StackPanel>
                                    </ControlTemplate>
  • You must to post comments
0
0

I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support-dev.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)

However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies