Telerik Forums
UI for WPF Forum
3 answers
117 views
Hi,

I was previously using RadDragAndDropManager and in AddDragQueryHandler i was locating the source
element that was dragged and using e.Options.Source from DragDropQueryEventArgs and based on some logic
i was enable/disable the drag. Now i am using the DragDropManger and i see i dont have access to e.Options.Source 
object.

So let me know how can i find the source element (UI) and may be the mouse position from where the drag started that can help
fix the upgrade to DragDropManager.


Thanks
Raghu
Nick
Telerik team
 answered on 05 Sep 2013
1 answer
156 views
Hi,

I am trying to remove table from blocks so above error message comes and table not able to remove.

my code
Telerik.Windows.Documents.Model.Span spanbox = editor.Document.CaretPosition.GetCurrentSpanBox().AssociatedSpan;
                StyleDefinition expansionstyle = new StyleDefinition();
                    expansionstyle.SpanProperties = new SpanProperties() { FontWeight = FontWeights.SemiBold, ForeColor = Colors.Brown };
                    if (spanbox.FontWeight == FontWeights.SemiBold && spanbox.ForeColor == Colors.Brown)
                    {
                        Telerik.Windows.Documents.Model.Section currsect = editor.Document.CaretPosition.GetCurrentSectionBox().AssociatedSection;
                        bool check = editor.Document.CaretPosition.MoveToNextInline();
                        var documentelement = editor.Document.CaretPosition.GetCurrentTableBox();
 
                        if (documentelement!=null && documentelement.GetType() == typeof(TableLayoutBox))
                        {
                            spanbox.Tag = Guid.NewGuid().ToString();
                            //var tableStyle = editor.Document.StyleRepository["TableGrid"] as StyleDefinition;
                            Telerik.Windows.Documents.Model.Table tbl = documentelement.AssociatedTable;
 
                            if (tbl != null)
                            {
 
                                TableHelper Thelp = new TableHelper();
                                Thelp.TableReferenceId = spanbox.Tag;
                                foreach (Telerik.Windows.Documents.Model.TableRow c in tbl.Rows)
                                {
                                    TableRowHelper rowhelper = new TableRowHelper();
 
                                    foreach (Telerik.Windows.Documents.Model.TableCell cell in c.Cells)
                                    {
                                        TableCellHelper cellhepl = new TableCellHelper();
                                        foreach (DocumentElement block in cell.Blocks)
                                        {
 
                                            DocumentElementCollection docelement = new DocumentElementCollection(block);
                                            foreach (var item in block.Children)
                                            {
                                                docelement.Add(item);                                              
 
                                            }
 
                                            cellhepl.DocumentElementCollection.Add(docelement);
                                        }
 
                                        rowhelper.TableCellCollection.Add(cellhepl);
                                    }
 
                                    Thelp.TableRowHelperCollection.Add(rowhelper);
                                }
                                TableHelpCollection.Add(Thelp);
                                ExpandedColl.Add(spanbox.Tag, tbl);
                                //stylecoll.Add(spanbox.Tag, tableStyle);
 
                            }
                            styles.Add(spanbox.Tag, documentelement.AssociatedTable.Style);
                            currsect.Blocks.Remove(tbl);
 
                            //editor.Document.StyleRepository.Add(tableStyle);
                             
                            
                        }


how to resolve this error 
Petya
Telerik team
 answered on 04 Sep 2013
12 answers
271 views

I have a custom connection class as shown below. I have removed the 5 connectors of my nodes ("Auto", "Left", "Right", "Top", "Bottom") and added my own connectors "In" and "Out".

public class MyChartConnection : RadDiagramConnection
{
    public MyChartConnection(MyLink link)
        : base()
    {
        SourceConnectorPosition = /*ConnectorPosition.Auto*/ "in";
        SourceCapType = link.SourceCapType;

        TargetConnectorPosition = /*ConnectorPosition.Auto*/ "out";
        TargetCapType = link.TargetCapType;
    }
}

This crashes when I try to apply your TreeLayout(). Apparently, it cannot find the "Bottom" connector... Should I use another layout class? Do I have to implement my own layout class?

Kristoffer
Top achievements
Rank 1
 answered on 04 Sep 2013
0 answers
94 views

We are unable to automate testing for our WPF application using MS Coded UI test. The sample application contains a RadGridView with just two columns. In one column, we have added a button which displays a Message Box on click. We are trying to automate this button click.

The grid is defined like this:

<telerik:RadGridView x:Name="MyLinkGrid" Height="135" AutoGenerateColumns="False" Margin="10" Width="300">

    <telerik:RadGridView.Columns>

        <telerik:GridViewDataColumn x:Name="GridViewDataColumnID" Header="ID" DataMemberBinding="{Binding Name}" />

        <telerik:GridViewColumn x:Name="GridViewDataColumnName" Header="Name" IsReadOnly="True">

            <telerik:GridViewColumn.CellStyle>

                <Style TargetType="telerik:GridViewCell">

                    <Setter Property="Template">

                        <Setter.Value>

                            <ControlTemplate>

<Button x:Name="colID" Content="{Binding ID}" VerticalContentAlignment="Center" Foreground="Blue" Click="Button_Click" Width="Auto" AutomationProperties.AutomationId="{Binding ID}" />

                            </ControlTemplate>

                        </Setter.Value>

                    </Setter>

                </Style>

            </telerik:GridViewColumn.CellStyle>

        </telerik:GridViewColumn>

    </telerik:RadGridView.Columns>

</telerik:RadGridView>

private void Button_Click(object sender, RoutedEventArgs e)

{

    MessageBox.Show("Button_Click");

}

During playback the button click event is not automated.

However if we move the ID column after the Name column, the button click event is played back and message box is displayed.

Attached is the sample WPF app along with the Coded UI test project.

Also if we add DataTemplate to our column definition, the button click event doesn’t occur during playback. 

Tim
Top achievements
Rank 1
 asked on 04 Sep 2013
1 answer
264 views
The default implementation of the UndoRedoService is way too picky. Every possible UI transition adds an entry to the undo buffer. We don't want the user to be able to undo certain operations. E.g. when you click on a node, its ZIndex changes - implying a "Undo Set ZIndex" in the undo buffer. There are certainly more of these unnecessary undoables.

How can we customize this undo/redo behavior?
Pavel R. Pavlov
Telerik team
 answered on 04 Sep 2013
3 answers
99 views
Hi,

as you can see on the attached file, i have a category "Aufgabe" and a Resource called "Art" which contains the same items
like "Urlaub". Now i want to Change the Category and i want to Change the Resource item too. Same way if i Change the Resource Item
the category item should change too.

Thanks
Best Regards
Rene
Yana
Telerik team
 answered on 04 Sep 2013
2 answers
128 views
sds
I am curious if it is possible to add a lineseries (or other series) to a CartesianChartGrid with the characteristics of the "desired line" within the attached file.

This line will track a digital state, so the only values will be 0 and 1.  When changing value, we wish to produce the effect of a vertical line such as a block, rather than a gradual climb or descent as such in the "current line".

Below is the code which creates the "current line" series:

 

var outputsuperImposedLineSeries = new LineSeries();
outputsuperImposedLineSeries.ValueBinding = new PropertyNameDataPointBinding("Value");
outputsuperImposedLineSeries.CategoryBinding = new PropertyNameDataPointBinding("Timestamp");
outputsuperImposedLineSeries.ItemsSource = superImposedMappings.Groups.First() as IEnumerable;
outputsuperImposedLineSeries.Stroke = Brushes.Purple;
outputsuperImposedLineSeries.TrackBallInfoTemplate = BuildTrackBallInfoTemplate(Brushes.Purple.ToString(), name, 4);
outputsuperImposedLineSeries.VerticalAxis = new LinearAxis { Minimum = 0, ElementBrush = Brushes.Purple, Title = name, HorizontalLocation = Telerik.Charting.AxisHorizontalLocation.Right };
superImposedSeries.Add(outputsuperImposedLineSeries);

Is this desired effect possible?

Thank you for your time,
-Brett

Edit:
The title should read "Help for creating a series to track digital values similar to a step".  My apologies for the incorrect title.
Brett
Top achievements
Rank 1
 answered on 03 Sep 2013
2 answers
99 views
Hi there, everytime I run my app appears this message in every RadGridView.
is there any possibility to delete them?

By the way, I'm using the under trial license

"Arrastre el encabezado del grupo....."
Enric
Top achievements
Rank 1
 answered on 03 Sep 2013
16 answers
3.3K+ views
Hi guys,

   I'm a WPF developer, and I'm looking for some sample code that will show me how to set the radGridView row background color based on the value of a column in the row. Do you have an example that will do so?
   Specifically, I want to set a row's background color to Red if the value of Due_Date is within 1 day of today, and to Yellow if it's between 2 and 3 days from today.

Thanks,

Les
Claudio
Top achievements
Rank 1
 answered on 03 Sep 2013
3 answers
502 views
How do I create summary rows in wpf . We are switching our windows form project to wpf and we are doing this in winforms:

var actualInItem = new GridViewSummaryItem("ActualIn", "{0:C}", GridAggregateFunction.Sum);<br>                var actualOutItem = new GridViewSummaryItem("ActualOut", "{0:C}", GridAggregateFunction.Sum);<br>                var grossItem = new GridViewSummaryItem("Gross", "{0:C}", GridAggregateFunction.Sum);<br>                var operatorShareItem = new GridViewSummaryItem("OperatorShare", "{0:C}", GridAggregateFunction.Sum);<br>                var CmsnLocationItem = new GridViewSummaryItem("CmsnLocation", "{0:C}", GridAggregateFunction.Sum);<br>                var overShortItem = new GridViewSummaryItem("OverShort", "{0:C}", GridAggregateFunction.Sum);<br>                var PayoutPercentage = new GridViewSummaryItem("PayoutPercentage", "Avg: {0:P1}", GridAggregateFunction.Avg);<br><br>                var summaryRowItem = new GridViewSummaryRowItem(<br>                    new[] { actualInItem, actualOutItem, grossItem, overShortItem, operatorShareItem, CmsnLocationItem, PayoutPercentage });<br><br><br>                template.SummaryRowsBottom.Add(summaryRowItem);

I can understand the aggregate functions can be done in my viewmodel but how do I add the summary row. Also, I have already used the row detail to display a child grid if that matters.
Dimitrina
Telerik team
 answered on 03 Sep 2013
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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?