Telerik Forums
UI for WPF Forum
5 answers
240 views
Hello, I am trying to color the CandleSticks within a RadCartesianChart but the code does not seem to be working. This is the code:

<telerik:RadCartesianChart.Series>

    <telerik:CandlestickSeries ItemsSource="{Binding currentDataSource}"
           OpenBinding="Open"
           HighBinding="High"
           LowBinding="Low"
           CloseBinding="Close" 
           CategoryBinding="FromDate"
           TrackBallInfoTemplate="{StaticResource trackBallInfoTemplate}">

        <telerik:CandlestickSeries.DefaultVisualStyle>
            <Style TargetType="telerik:Candlestick">
                <Setter Property="StrokeThickness" Value="2" />
                <Setter Property="UpStroke" Value="Yellow" />
                <Setter Property="DownStroke" Value="Cyan" />
                <Setter Property="UpFill" Value="Green" />
                <Setter Property="DownFill" Value="Red"/>
            </Style>
        </telerik:CandlestickSeries.DefaultVisualStyle>
    </telerik:CandlestickSeries>

</telerik:RadCartesianChart.Series>

Also, is it possible to have different color for some of the candlesticks according to a custom logic? For example, if the value == 200, the candlesticks should be green, otherwise red. Thanks

Peshito
Telerik team
 answered on 12 Nov 2014
4 answers
130 views
Hello,

I'am on edge of exasperation. XAML-DSK don't work. Demos don't work. Copy+Paste from web+forum don't work.

Isn't there a simple AND complete example working solution with Northwind sql database and any (preferably GridView)?

I simply want to 1. UNZIP, 2. Open in VS and 3. Adjust SQL connection sting in app.config and 4. RUN!

Thank you!
SailorChris
Top achievements
Rank 1
 answered on 11 Nov 2014
4 answers
708 views
Hi,

In the RadRichTextBox I'm working with, I am listening to the SelectionChanged event when the user selects a piece of a string. I need to determine, within the span.Text in which the string is located, what is the position (index) within the Span.Text of the selected string.

So, for example, if the span.Text contains "This is a piece of text"

and the user selects "piece"

I want to write code that returns "10", which is the index of "piece" within "This is a piece of text"

I have tried various properties that I hoped would get me this number - eg

var range = t.Document.Selection.Ranges.First;
if (range != null)
{

       string curSpanText = t.Document.CaretPosition.GetCurrentSpanBox().AssociatedSpan.Text;
       string s = t.Document.Selection.GetSelectedText();
       int start = range.StartPosition.GetCurrentPositionInSpan();
       int end = range.EndPosition.GetCurrentPositionInSpan();
}

I hoped that "start" above would give me what I needed but it doesn't.

s gets me the string I had selected. curSpanText is the entire span's Text property. How do I find the position of s within curSpanText?

Thanks
  
Elizabeth
Top achievements
Rank 1
 answered on 11 Nov 2014
1 answer
168 views
Hello,

I created a user control and changed it into a RadWindow. The application is using the Windows 8 touch theme with an implicit style. The libarary version is Telerik 2014 Q3.

The Visual Studio 2013 Designer shows either an empty window or a null reference exception when I have set references to Telerik Libraries in a custom folder. The Window is shown properly when the Telerik libraries are loaded from the installation folder. 

I have used the technique as mentioned in: http://www.telerik.com/help/wpf/radwindow-how-to-use-radwindow-as-user-control.html  The exception is shown in the designer when the style is applied to the window via Style ="{DynamicResource RadWindowStyle}" instead of setting it in App.xaml. The theme xaml files are loaded from the Theme dll.

Kind regards,
Bert



Kalin
Telerik team
 answered on 11 Nov 2014
3 answers
96 views
After a simple replace of the DLLs and clean solution, rebuild, nothing works.


WTF!!!  No menu, no buttons, not one single Rad control is visible.
Eric
Top achievements
Rank 1
 answered on 11 Nov 2014
19 answers
277 views
Hi Team,

We are using the Telerik controls in our application and to test the application we are using Coded UI Test 2012.

We were able to record actions on the controls placed inside the RadPaneGroup. But the playback is failing.
For the button inside the RadPaneGroup, CUIT is identifying the button control with the following hierarchy:
--->MainWindow
--->Rad Split Container
---> Rad Pane Group --->Button But it is failing to playback actions on the button. Following is the exception message with which the CUIT is failing:

---------------------------------------------------------------------------------------------------------
<<Result Message: >>
Test method CodedUITestProject2.CodedUITest1.CodedUITestMethod1 threw exception: 
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details: 
TechnologyName:  'UIA'
ControlType:  'Button'
AutomationId:  'test'
 Search may have failed at 'Rad Pane Group' TabList as it may have virtualized children. If the control being searched is descendant of 'Rad Pane Group' TabList then including it as the parent container may solve the problem. ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
Result StackTrace:
at Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IScreenElement.FindAllDescendants(String bstrQueryId, Object& pvarResKeys, Int32 cResKeys, Int32 nMaxDepth)
   at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindAllScreenElement(String queryId, Int32 depth, Boolean singleQueryId, Boolean throwException, Boolean resetSkipStep)
   at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindScreenElement(String queryId, Int32 depth, Boolean resetSkipStep)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String queryId, Int32 maxDepth, Int32& timeLeft)
 --- End of inner exception stack trace ---
    at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapControlNotFoundException(COMException ex, IPlaybackContext context)
   at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowComException(COMException innerException, IPlaybackContext context)
   at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, IPlaybackContext context)
   at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String queryId)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String queryId, Int32 maxDepth, Int32& timeLeft)
   at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetElement(Boolean useCache, ISearchArgument searchArg)
   at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.Search(ISearchArgument searchArg)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindInternal()
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<Find>b__d()
   at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.Find()
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetPropertyPrivate(String propertyName)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<>c__DisplayClass11.<GetProperty>b__10()
   at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetProperty(String propertyName)
   at Microsoft.VisualStudio.TestTools.UITesting.ALUtility.GetTechElementFromUITestControl(UITestControl uiTestControl)
   at Microsoft.VisualStudio.TestTools.UITesting.ActionExecutorManager.GetActionExecutor(UITestControl uiControl)
   at Microsoft.VisualStudio.TestTools.UITesting.Mouse.ClickImplementation(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)
   at Microsoft.VisualStudio.TestTools.UITesting.Mouse.<>c__DisplayClass6.<Click>b__5()
   at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
   at Microsoft.VisualStudio.TestTools.UITesting.Mouse.Click(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)
   at Microsoft.VisualStudio.TestTools.UITesting.Mouse.Click(UITestControl control, Point relativeCoordinate)
   at CodedUITestProject2.UIMap.RecordedMethod7() in c:\Users\smamidi\Documents\Visual Studio 2012\Projects\CodedUITestProject2\CodedUITestProject2\UIMap.Designer.cs:line 136
   at CodedUITestProject2.CodedUITest1.CodedUITestMethod1() in c:\Users\smamidi\Documents\Visual Studio 2012\Projects\CodedUITestProject2\CodedUITestProject2\CodedUITest1.cs:line 34

---------------------------------------------------------------------------------------------------------

This is a blocking issue. Any help in automating on the controls placed inside the RadPaneGroup is greatly appreciated.

Regards,
Rajesh.

Posted on Nov 15, 2012 (permalink)

We are using the Telerik controls in developing our application. We were using Coded UI Test to test our application.

Deak
Top achievements
Rank 1
 answered on 11 Nov 2014
1 answer
187 views
Hi,
 
I have RadRichTextBox on my WPF Window. I am using MVVM design pattern and have binding in my View for this RadRichTextBox using TxtDataProvider as below:

<Window.DataContext>
        <local:vmRichTextBox />
    </Window.DataContext>
    <Grid>
        <telerik:RadRichTextBox x:Name="rchTextBox" Width="210" Height="150">
        </telerik:RadRichTextBox>
        <telerik:TxtDataProvider RichTextBox="{Binding ElementName= rchTextBox}"  Text="{Binding Path= MessageToSend, Mode= TwoWay, UpdateSourceTrigger= PropertyChanged}"></telerik:TxtDataProvider>
    </Grid>

Here Binding works perfect. Now, I would like the user to enter 120 characters only in above RadRichTextBox in a manner  that whenever user enters 121st character the foregoround color of this character and exceeding characters changes to Red while typing itself. The first 120 characters will have default  foreground color.
Please let me know how to implement this functionality with this RadRichTextBox in MVVM asap.

Thanks
Petya
Telerik team
 answered on 11 Nov 2014
4 answers
382 views
I need to have the Richtextbox display a transparent background and border when IsEnabled is set to true.  After fumbling around for a few hours I am unable to get the control to cooperate.

Any help would be appreciated.
Todor
Telerik team
 answered on 11 Nov 2014
1 answer
213 views
Hi,  

In most use-cases, I enjoy the fact that a RadGridView cell which fails validation will "trap" the user's focus, and require the user to fix the cell contents.  However, in the current project I am working on, I need to allow the user to switch focus simply by mouse-click (currently if the user enters an invalid cell, they must hit esc first), even out of cells which have failed validation.

How do I get this behavior?  

Thanks,
Dustin
Boris
Telerik team
 answered on 10 Nov 2014
1 answer
179 views
Hi,

I implemented a search functionality with the PDF Viewer control. The user have the flexibility to do a findfirst, findlast, findprior, findnext and depending on what the user did, I highlight the searchtext corresponding on which action the user did. I would like to know how to scroll to the matching text I found to have it in the visible portion of the viewer.

Thank's
Alain
Deyan
Telerik team
 answered on 10 Nov 2014
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?