Telerik Forums
UI for WPF Forum
1 answer
173 views

When using the RadImageEditor for WPF, I would like to keep the image centered when I programatically set the ScaleFactor property to magnify the image.

I assume that would mean controlling the horizontal and vertical scrollbar positions from code.  

Is there a way to do that?
Todor
Telerik team
 answered on 29 Aug 2014
5 answers
548 views
I'm currently working on getting the ScheduleView to act like a nice Gantt chart for a project. In essence, what we require is a chart that displays A series of Gantt-lines for items to show reservations in a TimeLine view.

Currently, we're having issues getting the styling to work correctly and would like to know what styles to change to get the following to work:

* Kill the hours/minutes line. We want it gone entirely.
* Format date be two lines with weekdays as names below the date 
* Replace the resources with a custom view (we use MVVM of course) To have a lot more information display, including an image per item.
* Have the option for coloring each booking-entry according to an enum on the object (ie red for bookings, yellow for maintenances, green for unconfirmed bookings etc)

So far we've managed to edit the resources for the RadScheduleView to hide the timeLine button entirely when the title is null, but trying various suggestions and test-projects found on these forums for the rest has, so far, not helped with the other stuff. An example is the hours/minutes line that looks odd. I found a reply her telling me to set the TimeRulerItemStyleSelector to null and have an empty style to replace it (height + width set to 0, visibility collapsed) but, as the attached image shows, this didn't quite do the trick.

Any and all help is appreciated :)
Yana
Telerik team
 answered on 29 Aug 2014
1 answer
207 views
I develop automated tests using MS VS 2012 and CodedUI. Our application contains number of teleriks gridviews. For test purposes I need to obtain every row from those gridviews, but the problem is I can only obtain limited number of rows due to virtualization. Tried scrolling new rows into view to realize them and adding them to array/collection
code snippet:

// determine viewport, i.e. how many rows are accessible for that specific panel
             
            for (int m = 0; m < 50; m++)
            {
                try
                {
                    if (!hGridView.GetRow(m).Exists)
                    {
                    }
                }
                catch (UITestControlNotFoundException)
                {
                    viewPort = m - 1;
                    break;
                }
            }
 
            // no extra scrolling required, all rows are accessible
            if (rowCount <= viewPort + 1)
            {
                for (int m = 0; m < rowCount; m++)
                {
                    rows_output[m] = hGridView.GetRow(m);
                }
                return rows_output;
            }
 
            //get all accessible rows before scrolling to expose the rest
            for (int m = 0; m <= viewPort; m++)
                {  
                    rows_output[m] = hGridView.GetRow(m);
                    col1.Add(hGridView.GetRow(m));
                }
 
            for (int m = 0; m < viewPort; m++) { Keyboard.SendKeys("{DOWN}"); }
             
            for (int i = 0; i <= rowCount - viewPort - 2; i++)
            {
                 
                try
                {
                    // check the row to add isn't a duplicate
                    if (!col1.Contains(hGridView.GetRow(viewPort)))
                    {
                        col1.Add(hGridView.GetRow(viewPort));
                    }
 
                    rows_output[i + viewPort + 1] = hGridView.GetRow(viewPort);
                }
                catch (UITestControlNotFoundException)
                {
                    // if for some reason gridview becomes inaccessible
                    break;
                }
 
                //scroll the grid down a bit
                Keyboard.SendKeys("{DOWN}");
 
            }
code works ok when i'm debugging, but when i'm just running the test resulting array is mess, the same ~10 rows repeats again and again
What's wrong with this code? Is there any other reliable way to get all the data from virtualized grid?
Dimitrina
Telerik team
 answered on 29 Aug 2014
1 answer
216 views
Is Telerik (UI for WPF) has a set of icons ready to use? I know that some of Telerik WPF themes have very small set of icons but I mean something big like in mahapps metro (http://mahapps.com/guides/icons-and-resources.html). It doesn't have to be Canvas icons it could be pictures icons(png, jpg).
Yana
Telerik team
 answered on 29 Aug 2014
2 answers
181 views
I'm using WPF Telerik Controls Q2 2014. When I use RadDatePicker, it also allows to select time (which is not the expected behaviour). Tried setting InputMode="DatePicker", still didn't help. Also, the selected date is not displayed properly as the watermark is visible everytime. Am I missing anything ?

My code is:

xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"    

<telerik:RadDatePicker Grid.Row="0" Grid.Column="1"                                                                              
                                          Width="120" InputMode="DatePicker"
                                          HorizontalAlignment="Left" VerticalAlignment="Top" 
                                          Margin="10,10,5,5"></telerik:RadDatePicker>


Please see the attached screenshot.
Josh
Top achievements
Rank 1
 answered on 29 Aug 2014
3 answers
400 views
I'm not sure how to describe this.  I have a RadSlider that controls a dynamic range adjustment of an image.  I've bound the slider selection values to a property named "DraSelection".  As the user moves the max slider button and I get calls to DraSelection::set, I continually update the DRA of the image.  This can be expensive computationally, but I need it to updates to happen immediately to the image so I have to set DeferredDraggingEnabled to "false".  

As a result, sometimes the DRA processing just can't keep up with the user moving the slider.  I would be OK with that (it will catch up when the user stops moving) but I've found that when this happens -- when we get into these laggy situations -- RadSlider starts sending me bizarre calls to DraSelection::set as if it's trying to "predict" where the slider is going to be rather than telling me where it actually is.

To illustrate, it happens like this:

1. Picture a range of, say, 0 to 100 for the slider
2. Min slider is at 0, Max is at 100
3. User grabs the max slider button and start moving the max down.  99, 98, etc
4. With each move, i get  a DraSelection::set from Telerik.
5. I call some expensive function (call it "SetDra").  It is expensive enough to let the user move the slider many ticks before it returns
6. Eventually, the user has moved the max button quite a bit,  say, down to... 75. without the SetDra() function having returned.
7. Now RadSlider suddenly gives me a DraSelection::set call and the max value is something ridiculously low, like... 40.

Note that at no point did the user ever actually move the slider to 40 or anywhere near it.  But RadSlider gave me an update as if he did.  So the slider jumped all the way to the left (40) while the mouse cursor was still sitting to the right at 75.  It is as if RadSlider "predicted" it was going to be at 40 by the next time it could get something done so it just "faked" it.  

Note also that the user still has the mouse button down.  He hasn't even lifted it up at this point.  He's just paused.  So technically he is still dragging that slider.  And if he then (after a delay) moves it just a tiny bit -- like from 75 to 76, then the max slider jumps all the way back from 40 to 76 and I get another DraSelection::set with a max of 76 again.

I can't have this behavior in a finished product but I need immediate processing.  Is there any way to turn off this behavior without setting DeferredDraggingEnabled to "true"

I should note that I am using version 2012.3.1129.40 of Telerik.  I am not permitted to update to a more recent version now but will as soon as I can.  Sso if this is some sort of bug that has been fixed, is there any other workaround besides deferred dragging?.

Or perhaps I'm doing something wrong.  Here's my XAML  (minus some irrelevant properties)

            <tk:RadSlider x:Name="DraSlider" 
                          VerticalAlignment="Top"
                          HorizontalAlignment="Stretch"
                          Ticks="0"
                          Minimum="{Binding Path=DraRangeMin}"
                          Maximum="{Binding Path=DraRangeMax}"
                          Visibility="{Binding Path=Ready, Converter={StaticResource CvtBoolToVis}}"
                          IsEnabled="{Binding Path=CanUpdateDraSliders}"
                          Selection="{Binding Path=DraSelection, Mode=TwoWay}"
                          SelectionChanged="DraSlider_OnSelectionChanged"
                          StepAction="MoveRange"
                          IsSelectionRangeEnabled="True">
Kiril Vandov
Telerik team
 answered on 29 Aug 2014
1 answer
760 views
is it possible to add a radgridview control to a tabcontrol/tabitem programmatically? i need to dynamically create tabs and then populate them with a grid that has a radgridview, radchart, etc.

i can't figure out how to do this, so i'm starting to think it isn't possible. if that's the case, is there a way to somehow template the tabs in xaml so i can simply instantiate them in code behind and the structure is already built?
Dimitrina
Telerik team
 answered on 28 Aug 2014
5 answers
290 views
I want to put a GridViewDateTimeColumn into my WPF RadGridView but GridViewDateTimeColumn doesn't seem to exist in Telerik.Windows.Controls (all the other GridView column controls seem to be there, just not this one). Am I missing something?
Dave
Dimitrina
Telerik team
 answered on 28 Aug 2014
2 answers
175 views
How can I determine if the current caret position in a RadRichTextBox is within a range that is editable?

Thanks.
Chris
Top achievements
Rank 1
 answered on 28 Aug 2014
4 answers
212 views
Hi,
I have a RadMaskedTextInput with both AllowInvalidValues and AcceptsReturn set to false. When user pastes a multi-line text into the control, the control accepts the multi-line text, and changes its height. Is there a way to reject the input and keep the height?

Thanks.
Gong
Vadimir
Top achievements
Rank 1
 answered on 28 Aug 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?