Telerik Forums
UI for WPF Forum
4 answers
263 views
Hello,

I upgraded from version 2012.3.1129.40 to 2013.3.1204.40.
In our application, we can drag a node from a treeview and drop it in a WinForms control.
With the old version of Telerik, we were able to change the TreeViewDragCue object from the WinForm control, like this:
RadDragAndDropManager.Options.Effects = ConvertToWpfEffects(effects);
var l_cue = RadDragAndDropManager.Options.DragCue as Telerik.Windows.Controls.TreeView.TreeViewDragCue;
if (l_cue != null)
{
    switch (effects)
    {
        case DragAndDropEffects.Copy:
            l_cue.DragActionContent = "Copy To";
            l_cue.IsDropPossible = true;
            break;
        case DragAndDropEffects.Move:
            l_cue.DragActionContent = "Link With";
            l_cue.IsDropPossible = true;
            break;
        default:
            l_cue.IsDropPossible = false;
            break;
    }
}

Now with the new version, I'm using the recommended DragDropManager and DragDropPayloadManager objects, I tried this:
private void OnDragOver(object sender, System.Windows.Forms.DragEventArgs e)
{
    var options = DragDropPayloadManager.GetDataFromObject(e.Data, TreeViewDragDropOptions.Key) as TreeViewDragDropOptions;
    if (options != null)
            {
                var l_dragVisual = options.DragVisual as TreeViewDragVisual;
                switch (effects)
                {
                    case DragAndDropEffects.None:
                        options.DropAction = DropAction.None;
                        if (l_dragVisual != null)
                        {
                            l_dragVisual.IsDropPossible = false;
                            options.UpdateDragVisual();
                        }
                        break;
                    case DragAndDropEffects.Copy:
                        options.DropAction = DropAction.Delete;
                        if (l_dragVisual != null)
                        {
                            l_dragVisual.IsDropPossible = true;
                            options.UpdateDragVisual();
                            l_dragVisual.DropActionText = "Copy To";
                        }
                        break;
                    case DragAndDropEffects.Move:
                        options.DropAction = DropAction.Delete;
                        if (l_dragVisual != null)
                        {
                            l_dragVisual.IsDropPossible = true;
                            options.UpdateDragVisual();
                            l_dragVisual.DropActionText = "Link With";
                        }
                        break;
                }
            }
}

Unfortunately, the options object is always null.
Is there a way to change the TreeViewDragVisual object to give a feedback ?

Best regards,
Stéphane
Top achievements
Rank 1
 answered on 05 Feb 2014
1 answer
258 views
I try created my first WPF Telerik WPF app.

I installed RAD Controls for Window.

In VS 2013 I chose File > New > Project >Telerik > Windows > C# RadControls WPF Application

In wizard I added ref to DLL Telerik.Windows.Controls, Telerik.Windows.Controls.Navigation and Telerik.Windows.Data.

VS creted WPF project but startup window is type of System.Windows.Window.

I hope that startup window will be type of RadWindow.

Ok, I deleted it and added Project > New Item > Telerik Scenarion > RadWindow.

VS added RadWindow. I changed startup URI in App.xaml.

Run WPF app and what happen :D

RadWindow is open in NavigationWindow :D 

I don’t understand why this magic happen. 

I know that in WPF in startup URI is on Page WPF automatically create NavigationWindow as host container for Page.

So where is problem?

Thanks for support
Vladi
Telerik team
 answered on 05 Feb 2014
3 answers
93 views
Hi, how can I set custom color for Doughnut3D slices ?

I've this code, and I want that "Slice 1" in Blue, "Slice 2" in Green, "Slice 3" in Red and "Slice 4" in Yellow. I need to use my personal colors.

// CODE
                    rcTimes.DefaultView.ChartArea.DataSeries.Clear();
                    rcTimes.DefaultView.ChartLegend.Header = string.Empty;
                    DataSeries serPT = new DataSeries();
                    Doughnut3DSeriesDefinition sdWorking = new Doughnut3DSeriesDefinition();
                    sdWorking.ShowItemLabels = false;
                    serPT.Definition = sdWorking;
                    DataPoint dp = new DataPoint(report.WorkingTime.TotalSeconds);
                    dp.LegendLabel = "Slice 1";
                    serPT.Add(dp);
                    dp = new DataPoint(report.WorkingExtraTime.TotalSeconds);
                    dp.LegendLabel = "Slice 2";
                    serPT.Add(dp);
                    dp = new DataPoint(report.PauseTime.TotalSeconds);
                    dp.LegendLabel = "Slice 3";
                    serPT.Add(dp);
                    dp = new DataPoint(report.AlarmTime.TotalSeconds);
                    dp.LegendLabel = "Slice 4";
                    serPT.Add(dp);
                    rcTimes.DefaultView.ChartArea.DataSeries.Add(serPT);
Tina Stancheva
Telerik team
 answered on 05 Feb 2014
7 answers
1.0K+ views
Hi,

I am using the DisplayIndex property on a RadGridView to set the column order in runtime (through databinding). The problem is that I receive an ArgumentOutOfRangeException when my window is opened.

The XAML looks like the following:

<code style="color: #000;"><</code><code style="color: #069;font-weight: bold;">Telerik:GridViewDataColumn<br></code><code style="color: #000;">TextAlignment="Left"<br></code><code style="color: #000;">TextTrimming="CharacterEllipsis"<br></code><code style="color: #000;">DisplayIndex="{Binding CreatedTimestampColumnIndex}"<br></code><code><font color="#000000">IsReadOnly="True"><br></font></code><code style="color: #008200;"><!-- And more code that sets the header and the CellTemplate with binding etc... --><br></code><code style="color: #000;"></</code><code style="color: #069;font-weight: bold;">Telerik:GridViewDataColumn</code><code style="color: #000;">></code>


        public int CreatedTimestampColumnIndex<br>        {<br>            get<br>            {<br>                return createdTimestampColumnIndex;<br>            }<br> <br>            set<br>            {<br>                createdTimestampColumnIndex = value;<br>                OnPropertyChanged("CreatedTimestampColumnIndex");<br>            }<br>        }
I've verified that I do get a callback to my property methods in the ViewModel. If I set the DisplayIndex to a static value in the XAML (i.e. DisplayIndex="3") works fine.

Why doesn't this work with data binding?

Details:
.NET version: 4.5
Telerik version. 2013.Q1

Would really appreciate a solution to this, thanks!
Dimitrina
Telerik team
 answered on 05 Feb 2014
1 answer
151 views
Hi!
The behaviour when the child dialog window blinks, when user clicks on currenlty inactive parent window is usual for regular non-telerik Window control.
Unfortunately, RadWindow doesn't blink, and our customers have noticed that. How do I achieve such behaviour?
Thank you!
Vladi
Telerik team
 answered on 05 Feb 2014
2 answers
196 views
I have the following XAML:

<t:RadNumericUpDown Value="{Binding Number, UpdateSourceTrigger=PropertyChanged}" IsEditable="True" />

when i focus the NumericUpDown field and press left or right arrow, the underlying Number property is being set.
Why?
The value did not change. And also in case of a RadWatermarkTextBox I do not observe such a behavior.
Paweł Polaczyk
Top achievements
Rank 1
 answered on 05 Feb 2014
1 answer
113 views
Hi,

is it possible to set a fix range where Appointments could be placed? Example:

Our working day is form 07:00 am to 06:00 pm. Now I have an Appointment from 4pm to 05:30pm and I want to Drag&Drop this Appointment one
our in the future. Normally it is 05:00pm to 06:30pm, but our working day ends on 06:00pm, now I want to switch to the next working day an start on
07:00am.

Is this possible?

Thanks
Best Regards
Rene
Yana
Telerik team
 answered on 05 Feb 2014
4 answers
122 views
 I am developing an application in which I require drag drop between two tree which a condition that
1. When child node is dragged , it needs to check if the Parent Node for that child is present in the Target Treeview,
    if (present)
     // add the child within that parent node
    else
     // Add the parent node and then the child node.
Gunasekaran
Top achievements
Rank 1
 answered on 05 Feb 2014
0 answers
99 views
Hi There,
I have a RadGridView inside a WPF Grid inside a Win32 window. When I set Win32 window style to WindowStyles.WS_CHILD, the frozen columns bar is disabled(still visible but can't be dragged). Is this a known issue?

Thanks,
Ke
Ke
Top achievements
Rank 1
 asked on 04 Feb 2014
1 answer
73 views
Hello.

I would like to change the margin of pages / space between pages inside the PDFViewer control but I couldn't find how to do it.
Can you help me?
Alexander
Telerik team
 answered on 04 Feb 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
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
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?