Telerik Forums
UI for WPF Forum
1 answer
190 views
Hi,

I am using RadTreeView on the left side of the screen and showing relative data in RadChart on the right of the screen. I am using MVVM design pattern (WPF), but facing few problems (as mentioned below) while zooming chart data.

1. I am NOT able to bind values for RangeEnd and RangeStart with MVVM property for zooming my chart data. My XAML code looks like:
<telerik:ChartDefaultView.ChartArea>
                                                <telerik:ChartArea Loaded="ChartArea_Loaded">
                                                        <telerik:ChartArea.ZoomScrollSettingsY>
                                                            <telerik:ZoomScrollSettings />
                                                        </telerik:ChartArea.ZoomScrollSettingsY>
                                                        <telerik:ChartArea.ZoomScrollSettingsX>
                                                            <telerik:ZoomScrollSettings MinZoomRange="0.01" RangeEnd="{Binding ChartRangeEnd, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" RangeStart="{Binding ChartRangeStart, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ScrollMode="ScrollAndZoom"  />
                                                        </telerik:ChartArea.ZoomScrollSettingsX>
                                                    <telerik:ChartArea.AxisX>
                                                        <telerik:AxisX IsDateTime="True"
                                                               AutoRange="True"
                                                               Step="1"
                                                               LabelStep="1"
                                                               DefaultLabelFormat="dd-MMM HH:mm"
                                                               LabelRotationAngle="30" StripLinesVisibility="Visible">
                                                                <telerik:AxisX.AxisStyles>
                                                                    <telerik:AxisStyles RenderOptions.ClearTypeHint="Enabled" />
                                                                </telerik:AxisX.AxisStyles>
                                                        </telerik:AxisX>
                                                    </telerik:ChartArea.AxisX>
                                                </telerik:ChartArea>
                                            </telerik:ChartDefaultView.ChartArea>


The properties definition in ViewModel is:
double _chartRangeEnd;
        public double ChartRangeEnd 
        { 
            get { return _chartRangeEnd; }
            set
            {
                _chartRangeEnd = value;
                OnPropertyChanged("ChartRangeEnd");
            }
        }

        double _chartRangeStart;
        public double ChartRangeStart
        {
            get { return _chartRangeStart; }
            set
            {
                _chartRangeStart = value;
                OnPropertyChanged("ChartRangeStart");
            }
        }


2. Zooming only works when I change RangeStart and RangeStart value pragmatically (in code behind on ChartArea_Loaded event), as shown below:
private void ChartArea_Loaded(object sender, RoutedEventArgs e)
        {
            this.radChart.DefaultView.ChartArea.ZoomScrollSettingsX.ScrollMode = ScrollMode.None;
            this.radChart.DefaultView.ChartArea.ZoomScrollSettingsX.RangeEnd = _viewModel.ChartRangeEnd;
            this.radChart.DefaultView.ChartArea.ZoomScrollSettingsX.RangeStart = _viewModel.ChartRangeStart;
            this.radChart.DefaultView.ChartArea.ZoomScrollSettingsX.ScrollMode = ScrollMode.ScrollAndZoom;
        }

Moreover if I remove top code line (this.radChart.DefaultView.ChartArea.ZoomScrollSettingsX.ScrollMode = ScrollMode.None;) then slider stretches 100% rather then getting within the limit of RangeStart and RangeEnd values.

The problem which I am facing while using code behind approach (using ChartArea_Loaded) is that when I click on any other node (after selecting first node) in the RadTreeView then RangeStart and RangeEnd values are not getting refreshed (as ChartArea_Loaded event is called only at the starting when Chart is loaded for the first time). 

I am willing and hoping to resolve this problem by using MVVM.

Any help will be highly appreciated.


Thank you,
Moon
Petar Marchev
Telerik team
 answered on 09 Apr 2012
3 answers
280 views
I have a grid that I'm using as a faux popup (I don't care for the RadWindow API) and it pops open when clicking various buttons in the RadDropDownButton.  The problem is that the RadDropDownButton stays on top of the popup unless you click off somewhere else.  Is there a close command I can manually send to the RadDropDownButton?  I'd like to attach the event to each button within the RadDropDownButton.

Thanks!
Tina Stancheva
Telerik team
 answered on 09 Apr 2012
27 answers
540 views
I am developing a demo application with RadDocking. I wrote a simple application using the code samples that came with Telerik controls for WPF. When this XAML is loaded in Designer I get the error message: 'Could not create an instance of type 'RadDocking''. However when I run this application it runs fine. Can anyone help me to figure out what is the problem?


This is the XAML code.
<Window x:Class="TestApplication.Window1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:qsf="clr-namespace:Telerik.Windows.QuickStart;assembly=Telerik.Windows.QuickStart" 
    Title="Window1" Height="300" Width="300" 
    xmlns:radDock="http://schemas.telerik.com/2008/xaml/presentation"
    <Grid> 
        <radDock:RadDocking> 
            <radDock:RadDocking.DocumentHost> 
                <radDock:RadSplitContainer> 
                    <radDock:RadPaneGroup> 
                        <radDock:RadDocumentPane Title="Description"
                            <radDock:RadDocumentPane.Content> 
                                <TextBlock TextWrapping="Wrap" 
                                        Text="On the Documents tab above press Ctrl + Mouse Left button to display the Popup Menu. You can use the same combination on every tab." /> 
                            </radDock:RadDocumentPane.Content> 
                        </radDock:RadDocumentPane> 
                        <radDock:RadPane Header="NotDragable" CanFloat="False"
                            <radDock:RadPane.Content> 
                                <TextBlock TextWrapping="Wrap" 
                                        Text="This pane cannot be dragged, because it has its property CanFloat set 'False'." /> 
                            </radDock:RadPane.Content> 
                        </radDock:RadPane> 
                    </radDock:RadPaneGroup> 
                </radDock:RadSplitContainer> 
            </radDock:RadDocking.DocumentHost> 
        </radDock:RadDocking> 
    </Grid> 
</Window> 





Swati
Top achievements
Rank 1
 answered on 09 Apr 2012
6 answers
284 views
Hi Telerik,

I can't seem to find the DropPosition when determining wheter a drop is allowed? Am I overlooking something? I can see the relative position and I guess I could calculate the relative position, but since the curson changes depending on drop position, I'm thinking the information is there somewhere...

Thnaks for any help,

Anders, Denmark
Tina Stancheva
Telerik team
 answered on 09 Apr 2012
1 answer
274 views
I've tried the demo and it opens and saves in html format perfectly.

This seems like a possibility in a case where you want to store a document as html format but allow rich editing and not have to rely on a web browser control for doing your editing.  For example a wpf app where you want users to be able to make and edit Wikipages inside the app but store them in html format for a web interface to the same app.

Can anyone confirm if they use it this way?
Boby
Telerik team
 answered on 09 Apr 2012
1 answer
136 views
I am trying to use the new DragAndDrop manager with the RadComboBox, I want to be able to drop an element from a treeview onto the ComboBox and apply a custom Drop Event that will select the dragged entity from the list. I have AllowDrop="True" on the ComboBox and I know the Treeview is set up correctly because I use it to drag to a ListBox. When the line DragDropManager.AddDropHandler(RadComboBoxBelongsTo, OnDrop); is run I get the error: Cannot find a Resource with the Name/Key DraggableItem. How do I drag to a RadComboBox??

Sorry, should have posted this on the Silverlight Forum, not sure if its the same for WPF.
Vlad
Telerik team
 answered on 09 Apr 2012
0 answers
333 views
Hi Telerik Team,

I'm trying to replace my wpf ListView with RadGridView 
but found error "The calling thread cannot access this object because a different thread owns it."

The c# code-behined are same, it's already work if I binding to ListView.

Please suggestion.

TestRadGridView example project. [http://yousend.it/HvZeCs]

Regards,
prasong242
Prasong242
Top achievements
Rank 1
 asked on 07 Apr 2012
1 answer
156 views
I created a simple project to address our problem with RadControls (Docking, RichTextBox and TreeView), could you provide me a support ticket so I can upload the zip file.  Thanks.
Pavel Pavlov
Telerik team
 answered on 07 Apr 2012
11 answers
243 views
I have two entities, for instance entityA and entityB inherited from entityB. In ObjectContext there is
ObjectSet<entityA> entityAs;
But I need an ObjectResult<entityB>, and has created this (custom) property on ObjectContext:
ObjectResult<entityB> entityBs
{ ... }
So when I user entityBs as QueryName in RadEntityFrameWorkDataSource (in XAML), then nearly all works fine except AddNew, because the QueryName is used for getting ObjectResult<> property value of ObjectContext, and for entitySetName.
Can I somehow enforce the real base entit class's set name for use as entitySetName, and (any) ObjectQuery as object query used to create QueryabelEntityCollection?

It is not a solution, when I use for QueryName the base ObjectSet's name (and approperiate FilterDescription), because the AddNew produce a base class instance not a derived class's one. 

(ok, I can create manually QueryabelEntityCollection<entityB>, but it is not real beuty solution :))
Kovács
Top achievements
Rank 1
 answered on 06 Apr 2012
1 answer
317 views
I would like to disable Keyboard focus for the RichTextBox.
My RichTextBox is acting more like a viewer, with possibility to select text but not edit.
When I use snoop to check te keyboard focus on my application, I see Keyboard.FocusedElement = Caret
I'm experiencing difficulties disabling this focus.

When I execute UIElement.MoveFocus(new TraversalRequest(FocusNavigationDirection.Up)) I can't either move the focus
Andrew
Telerik team
 answered on 06 Apr 2012
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
PersistenceFramework
DataPager
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?