Telerik Forums
UI for WPF Forum
3 answers
136 views
In short, if a control template uses triggers with enter/leave actions affecting a UIElement which is collapsed, WPF will leak that UIElement (complete specifics can be found here: http://blog.ramondeklein.nl/index.php/2009/02/20/memory-leak-with-wpf-animations/). Briefly, what happens is that if the item is collapsed, the enter/exit actions will not actually occur, but will be placed in a "DeferredActions" table in the template itself. If the UIElement is never shown, then these deferred actions won't be evaluated, and they'll remain as strong references to the the still collapsed UIElement.

In our case, this happens with the template for the RadBusyIndicator, which amongst other things, sets a ControlTemplate for the RadProgressBar it contains. The "IndeterminateDonut" UIElement in the RadProgressBar is initially Collapsed, even though there are Enter/Exit actions for animating it to continually go in a circle. Now this doesn't seem to be a problem when the BusyIndicator actually shows up at some point. However, when the RadBusyIndicator doesn't show up at any point during a Window's lifetime, and then the window is closed, we manifest the same exact problem as described above.

The fix was to grab the default ControlTemplate for the RadBusyIndicator, and change the initial visibility of the RadProgressBar to Hidden instead of Collapsed, so those actions can be evaluated. I haven't tested if this affects animation performance, however. As the link describes, this is fixed in WPF 4 using the ConditionalWeakTable to keep weak references to the elements which deferred actions will affect.
Pana
Telerik team
 answered on 11 May 2011
7 answers
365 views
When I set the command to an ApplicationCommand or an EditingCommand for a button within a standard
ToolBar as follows:
<ToolBar>
   <Button Command="ApplicationCommands.Cut" ToolTip="Cut">
      <Image Source="/Project;component/Images/editcut.png"/>
   </Button>
   <Button Command="EditingCommands.ToggleBold" ToolTip="Bold">
      <TextBlock FontWeight="Bold"><Run Text="B"/></TextBlock>
   </Button>
</ToolBar>
these commands fire correctly for text contained within a RichTextBox.

However if I change the ToolBar to a RadToolBar, the buttons are disabled.

What do I need to do to allow these commands to fire as expected?





Rayne
Top achievements
Rank 1
 answered on 11 May 2011
2 answers
94 views
Hi,
I am using the charts to draw 2 different data series each one linked to a different axis. The values in the Dataseries are relatively large (30 millions and more). The first axis is linked to the first Dataseries and the maximum is properly set. The secondary Y axis is created, added to the chart area but when setting the maximum, the application goes into an infinite loop (OutOfMemory).
This problem seems to happen when setting the maximum to a value larger than 10 millions.

Thank You
Julien

Here is the code creating the fault:
public MainWindow()
{
    InitializeComponent();
 
    //Creating the second Y axis
    AxisY secondaryAxis = new AxisY();
    secondaryAxis.AxisName = SECONDARY_AXIS_NAME;
    secondaryAxis.AutoRange = false;
    secondaryAxis.DefaultLabelFormat = "N";
    secondaryAxis.Step = 10000000;
    secondaryAxis.MinValue = 0;
    secondaryAxis.MaxValue = 100000000;
    chart.DefaultView.ChartArea.AdditionalYAxes.Add(secondaryAxis);
}
Julien
Top achievements
Rank 1
 answered on 11 May 2011
2 answers
266 views
Hi again,

How would I detect whether the RichTextBox selection contains an InlineUIContainer?

The DocumentSelection classes don't seem to support this out of the box with something like the FlowDocument TextSelection.Contains(TextPointer) call and the InlineUIContainer doesn't have it's own position information (like InlineUIContainer.ContentStart and ContentEnd properties for FlowDocument classes).

It seems slightly strange that you can use a DocumentPosition to insert something in a document but the element itself doesn't retain some of that information for later comparison against the SelectionRange objects to determine what is in the selection.

Could you point me in the right direction to solve/workaround this?

Thanks!
Paul
Top achievements
Rank 1
 answered on 11 May 2011
3 answers
118 views
Hi,

how do I replace the appointment creation/edit/etc. dialogs with truly custom implementations, i.e. not only template changes?

It seems that I can add a handler for the ShowDialog event. But setting the EventArg property Handled to true doesn't suppress the default dialog handling. Can I simply do my custom UI handling and then Cancel the event, e.g.

void SchedulerView_ShowDialog(object sender, ShowDialogEventArgs e)
{
    // Here goes the custom modal UI
    // ...
 
    e.Cancel = true;
}

Thanks,
Alexander
Yana
Telerik team
 answered on 11 May 2011
5 answers
1.0K+ views
Hi,

I have a chart with a scroll mode of "scroll and zoom" on one axis (the X axis). I also have MouseDown and MouseUp event handlers for the entire chart control.
  • The MouseDown and MouseUp events trigger as expected when I click down and release on any area of the chart excluding the scroll bar (and scroll bar thumb) of the scroll and zoom axis.
  • If I click on any area of the scroll bar (or scroll bar thumb), the MouseDown event does not trigger.
  • If I click on any area of the graph excluding the scroll bar thumb and release on the scroll bar (or scroll bar thumb), the MouseUp event triggers.
  • If I click on any area of the scroll bar thumb and release on any area of the graph, the MouseUp event does not trigger.

I would like to be able to capture a MouseDown event on the scroll bar (or scroll bar thumb) and a MouseUp event if a MouseDown event is triggered on the scroll bar thumb. I do not want to disrupt the functionality of the scroll bar (ie. I don't want to do anything like put an transparent control over the scroll bar), I just want to capture any MouseDown and MouseUp event on the chart, irrespective on the scroll bar or scroll bar thumb.

Kind regards,
Dave.

David
Top achievements
Rank 2
 answered on 11 May 2011
5 answers
110 views
Hi,
I'm using the standard sorting and filtering mechanism on an editable radgridview control. Unfortunately after ending the editing of a cell, the sorting / filtering mechanism strikes and the modified row is filtered out or is moved. The mechanism works correctly, but its result ist not what I need.

 What I need is the possibility to sort / filter only when using the possibilities of the grid header. Sorting /filtering after cell editing is unwanted. How can I achieve that?

Regards Reimund

Reimund
Top achievements
Rank 1
 answered on 11 May 2011
9 answers
80 views

Hello Sir or Ma'am,

I'm not sure if this is a result of your code or a bug in Expression Blend 3 & 4, but I posted a bug on Microsoft's site concerning your RadGridView control.  Basically, I am trying to "Edit Template -> Edit a copy" on this control and my Blend.exe process spins indefinetely.  The template never gets added to the application and Blend becomes non responsive.  It has not work several times alread even though I rebooted my machine.  Other controls like "RadButton" work just fine.  Just the RadGridView is causing this issue. 

See: https://connect.microsoft.com/Expression/feedback/details/616889/expression-blend-thread-spins-on-edit-a-copy#details

Any help you can offer would be appreciated. 

- Rashad Rivera
  Omegus Prime, LLC

Rashad Rivera
Top achievements
Rank 1
 answered on 11 May 2011
2 answers
93 views
Hi,
Starting with the 'Add a button column' example here:  http://www.telerik.com/help/wpf/gridview-add-button-column.html , I modified it so the button is on the 'Name' column, and I can trigger events for the different clubs.  But I noticed that the filter control and sorting are now gone, and would like to bring them back. 

I looked under the RadGridView Filtering topics, starting here http://www.telerik.com/help/wpf/gridview-basic-filtering2.html, and searched the Forums, but haven't recognized anything that can help me have a column with buttons, plus sorting, plus filtering.

Is this possible?  If so, can you please provide some direction?  (Sample projects much appreciated).

I'm working with:
WPF:  3.0.6920.4902
        (as per http://msdn.microsoft.com/en-us/library/aa349641.aspx)
OS:  Windows 7 Enterprise 64-bit
Browser:  IE9 v9.0.8112.16421
Telerik:  RadControls for WPF v2011.1.419.40
Preferred: C#

Thank you,
- Martin
Martin
Top achievements
Rank 1
 answered on 10 May 2011
2 answers
92 views
is there any way to get the parent of the selected item in the TreeListView? I am using hierarchical collections and would like to be able to find either the parents or the children of the selected item.

Thanks

Rick
Dimitrina
Telerik team
 answered on 10 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?