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

When using SelectionMode = Multiple, Is it possible to toggle the selected state of the item by clicking it?

Thanks in advance,

Alberto
Amige
Top achievements
Rank 1
Veteran
 answered on 18 Mar 2015
2 answers
117 views
Hi,
I have a problem again :))) . Diagram has 1360 items and 1481 connections. When I connection type is polyline and RouteConnection property is true, throw ContextSwitchDeadlock Exception. If I make RouteConnection property false, then it doesn't throw exception, and working without any problem. How can I solve it?

Thanks in advance.

Exception Message:
"The CLR has been unable to transition from COM context 0x20e480 to COM
context 0x20e5f0 for 60 seconds. The thread that owns the destination
context/apartment is most likely either doing a non pumping wait or
processing a very long running operation without pumping Windows
messages. This situation generally has a negative performance impact and
may even lead to the application becoming non responsive or memory
usage accumulating continually over time. To avoid this problem, all
single threaded apartment (STA) threads should use pumping wait
primitives (such as CoWaitForMultipleHandles) and routinely pump
messages during long running operations."
Mahmut
Top achievements
Rank 1
 answered on 18 Mar 2015
1 answer
125 views
Hi All

I try to build sqlDiagram, I have TableShape sample code. How can I use scrollview in TableShape? I want to scroll TableShape rows.
Petar Mladenov
Telerik team
 answered on 18 Mar 2015
1 answer
185 views
When I create my shapes, I'm changing the style of the Connections to look like the first image where they say "True" and "False". The function CreateTrueConnection shows the properties I'm setting. When I save and then reload the diagram it looks like the 2nd picture, which only retains the green and red colors, but none of the other styling and more importantly NOT the Name property, which I use in function GetTrueTargetRow to figure out my workflow in code. How do I serialize that information into the diagram so it will reload the same way?

public
static void CreateTrueConnection(RadDiagram Diagram, RadDiagramShape Shape, String Label = "")
{
    RadDiagramConnection tc = new RadDiagramConnection();
 
    tc.Stroke = Brushes.Green;
    tc.StrokeThickness = 2;
    tc.AllowDelete = true;
    ((Telerik.Windows.Diagrams.Core.IDiagramItem)tc).Name = "TrueConnection";
    tc.SourceConnectorPosition = Telerik.Windows.Diagrams.Core.ConnectorPosition.Bottom;
    tc.ConnectionType = Telerik.Windows.Diagrams.Core.ConnectionType.Polyline;
 
    tc.StartPoint = new Point(Shape.Connectors["Bottom"].AbsolutePosition.X, Shape.Connectors["Bottom"].AbsolutePosition.Y);
    tc.EndPoint = new Point(Shape.Connectors["Bottom"].AbsolutePosition.X, Shape.Connectors["Bottom"].AbsolutePosition.Y + 100);
    tc.TargetCapType = Telerik.Windows.Diagrams.Core.CapType.Arrow2Filled;
    tc.Source = Shape;
 
    // Add the "True" Label
    if (Label != "")
    {
        System.Windows.Controls.Border brdr = new System.Windows.Controls.Border();
        System.Windows.Controls.Label lbl = new System.Windows.Controls.Label();
 
        lbl.Background = Brushes.Green;
        lbl.Foreground = Brushes.White;
        lbl.FontWeight = FontWeights.Bold;
        lbl.HorizontalContentAlignment = HorizontalAlignment.Center;
        lbl.Content = Label;
 
        brdr.BorderBrush = Brushes.DarkGreen;
        brdr.BorderThickness = new Thickness(2.0);
        brdr.CornerRadius = new CornerRadius(3.0);
        brdr.Child = lbl;
 
        tc.Content = brdr;
    }
 
    Diagram.AddConnection(tc);
}

public static dsdSteps.BIEFlowchartStepRow GetTrueTargetRow(dsdSteps StepData, IShape Shape)
{
    dsdSteps.BIEFlowchartStepRow trueTargetRow = null;
    foreach (var con in Shape.OutgoingLinks)
    {                       
        //|| ((RadDiagramConnection)con).Stroke == Brushes.Green  <-- Tried looking at the connection color to know if it's true etc... didn't work
        if ((con.Name == "TrueConnection" || con.Name == "StartConnection") && con.Target != null)
        {
            trueTargetRow = (from x in StepData.BIEFlowchartStep
                             where x.GUID == ((RadDiagramShape)con.Target).Id
                             select x).FirstOrDefault();
        }
    }
    return trueTargetRow;
}

Pavel R. Pavlov
Telerik team
 answered on 18 Mar 2015
4 answers
232 views
Hello Group. We would like to have the ToggleButton on a form having the same style as listed in the Grid. Currently we have the Theming set to Windows 8 and then the togglebutton is filled solid with the win-8 color. Now we would like it to have a inner border in win-8 color style.
What I did I extracted the style into our own styling dictionary file and my button is yellow (?). This yellow color is verywhere so just replacing the colow does not solve this.
Can someone supply me the style for the toggle button like the one on in the Grid (having inner border)?  
Thanks,

    Richard
Richard
Top achievements
Rank 1
 answered on 18 Mar 2015
2 answers
51 views
(I'm not sure if this is the correct forum to post this question in or not. I'm seeing this behavior in the XAML view, so I suspect that I should post it here.)

I've got the DevCraft Complete suite. I suspect that it's effecting the display of code, perhaps its the JustCode piece; I'm not sure. What I'm seeing is some code in the XAML view looks fine, whereas other code is dim, almost to the point of being translucent. I've noticed this in both VS 2012 and VS 2013.

What is causing this? And what does it mean?
Rod
Top achievements
Rank 1
 answered on 17 Mar 2015
1 answer
117 views
Hi, I have this data {make: "Toyota", model: "Prius", fuel: ["Petrol", "Electric"] } (JSON for simple view) and a want show it on GridView Fuel column, with both data (Petrol and Electric) and make filterable, showing that model in the petrol selection and in the electric selection.

Sorry about my English.

Thanks in advance.
Dimitrina
Telerik team
 answered on 17 Mar 2015
2 answers
173 views
Dear Ad,

I would like to ask you a question that is about Sorting among groups in RadGridView control.
Look at the attachment.
1) when column is not grouping, I CAN sort size basing on Description then Length. (multi-criteria  sorting).
2) when column is grouped by Size, a box of Size at grouping area permits users to sort among group. The problem is; that sorting based on Caption/String of size.
The picture is showing 2x2 > 2x14 but actually I want  2x14 > 2x2 in this case.
I dig in this a lot, such as rebinding SortDescriptor at the event of grouping but looks like group-sorting is run at the last and noway to cancel it.
I called e.Cancel = true already, but this action seemed to make group-sorting disable like loosing this function on UI.

Please help me on "multi-criteria  group sorting".

Thanks
Hao
Dimitrina
Telerik team
 answered on 17 Mar 2015
1 answer
129 views
Hi team,
I've learned the Template Structure of RadExpander and know the header is just a RadToggleButton. Now I want to make the header sort of a container which contains other controls and also a button representing the functionality of the original RadToggleButton. I have no idea to do that? Any demos?

-Jingfei
Sia
Telerik team
 answered on 17 Mar 2015
1 answer
94 views
I am looking at ScheduleView to see if it can fit some of my scenarios. And here is some scenarios I stuck with:

1) occur 5 times a day on every 2 days

2) occur every 4 hours a day on every 2 days

Could I know how can I set this recurrence pattern on code behind?

Moreover, I have tried a RecurrencePattern like the following:

            pattern = new RecurrencePattern()
            {
                Frequency = RecurrenceFrequency.Daily,
                HoursOfDay = new int[] { 4, 8, 12, 16 },
                Interval = 2,
            };

and I suppose, on day 1 , the events occur at 4am,8am,12pm and 16 pm. On day 2, no event occur. On day 3 , events occur like on day . On day 4, no event occur.  But turn out, events occur on Day 2,Day 4 as well. Am I misunderstanding the parameter "Interval"? How can I set in this case if I want to occur on every 2 day?
Kalin
Telerik team
 answered on 17 Mar 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?