I am doing this in Caliburn Micro:
The view that host the Content Control:
<Controls:TransitioningContentControl Grid.Row=" Grid.Column=" x:Name="ActiveItem"/>
Test code in the view model - basically a timer that will assign TestSiteCollection[0] & TestSiteCollection[1] to ActiveItem repeatedly.
private void tmrMemTest_Tick(object sender, EventArgs e){ if (isAddLimit) { ActiveItem = TestSiteCollection[1]; isAddLimit = false; } else { ActiveItem = TestSiteCollection[0]; isAddLimit = true; GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced); // to see whether we have a leak or not. }}One of the TestSiteCollection elements is the RadDocking & its view look likes this.
<telerik:RadDocking Grid.Row=" HasDocumentHost=" PanesSource="{Binding TestPanelCollection, Mode=OneWay}"> <telerik:RadDocking.DockingPanesFactory>
<styles:CustomDockingPanesFactory/>
</telerik:RadDocking.DockingPanesFactory>
<telerik:RadSplitContainer InitialPosition="DockedLeft">
<telerik:RadPaneGroup x:Name="leftGroup" telerik:RadDocking.SerializationTag="leftGroup"/>
</telerik:RadSplitContainer>
<telerik:RadSplitContainer InitialPosition="DockedRight">
<telerik:RadPaneGroup x:Name="rightGroup" telerik:RadDocking.SerializationTag="rightGroup"/>
</telerik:RadSplitContainer>
<telerik:RadSplitContainer InitialPosition="DockedTop">
<telerik:RadPaneGroup x:Name="topGroup" telerik:RadDocking.SerializationTag="topGroup"/>
</telerik:RadSplitContainer>
<telerik:RadSplitContainer InitialPosition="DockedBottom">
<telerik:RadPaneGroup x:Name="bottomGroup" telerik:RadDocking.SerializationTag="bottomGroup"/>
</telerik:RadSplitContainer>
</telerik:RadDocking>
CustomDockingPanesFactory:
protected override RadPane CreatePaneForItem(object item){ var viewModel = item as TestPanelBase; if (viewModel != null) { var pane = viewModel.IsDocument ? new RadDocumentPane() : new RadPane(); pane.DataContext = item; pane.Header = viewModel.Header; // When saving the layout, RadDocking control generates an xml schema for its elements and their position, // size and other properties. // We need to set a SerializationTag for each Pane. Otherwise, each time when loading, // a new Pane will be generated and we will lose the DataContext, which is not desirable. RadDocking.SetSerializationTag(pane, viewModel.Header); if (viewModel.ContentType != null) { pane.Content = Activator.CreateInstance(viewModel.ContentType); } return pane; } return base.CreatePaneForItem(item);}protected override void RemovePane(RadPane pane){ // A problem could exist if you hold a reference to the old content or it was declared in XAML. // There is one memory leak in the Docking control we are aware of - // if you are removing the whole pane and it was the last one in the group, // it is not destroyed before you add another pane in this group pane.ClearValue(RadDocking.SerializationTagProperty); // Removes the Pane from the RadDocking layout. By default clears the Header, Content, DataContext and call RemoveFromParent method. base.RemovePane(pane);}
What i have observed is that every time ActiveItem is assigned, CreatePaneForItem() is called. I am suspecting that is the cause of the memory leak.
What can i do to prevent this multiple call to CreatePaneForItem()?
p/s: i have cleaned up other misbehaving codes that have contributed to the memory leak & i am now stuck at this observation.
Hello
I need to add button to selected date time now.
How can I do this without override the default style of the date time picker?
Best regards
Ehud
I have a Telerik report which includes text boxes, an HTML text box and a picture box. I am trying to save the report as a docx file and then open it in the RadRichTextBox in a WPF project. The report renders correctly as a docx file with the image and the content from the HTML text box but when that docx file is opened in the RadRichTextBox, both the image and the HTML text box content are missing.
In the attached files, the Header text "Endorsement 1" and the signature are the two items that are not showing in the RadRichTextBox.
version: 2014.3.1202.45
On a dataform with AutoCommit = True....
Am I correct in assuming that means that, when the user is editing an item and then navigates to another item, the dataform should commit the current edit before changing the current item? Likewise, if False, the dataform should cancel the edit, and return the object to its original values.
If that is true, then I would expect to see an EditEndingEvent then an EditEndedEvent thrown with the EditAction = EditAction.Commit.
(on the flipside, if AutoCommit = false, I would expect to see the same events with EditAction = EditAction.Cancel)
This is not happening. Am I misunderstanding the purpose of this setting?
Goal:
I need the opportunity, before the current item has changed, to validate the edit and to update the database with the changes. If the item does not pass the validation, then I need to be able to cancel the item change, keeping the user on the current item until it is valid, or the user cancels the edit.
In this situation, the datasource is a CollectionViewSource, and the CurrentItem is being changed by the user clicking on a RadGridView connected to the same source.
Can anyone provide any insight into making this scenario work properly?
Is it possible that it does work as expected, but I've done something to prevent the AutoCommit from working properly? (like a wrong datasource type or my custom CommandProvider)
thanks
Hi All,
Is there any current feature in RadPdfViewer through which I can navigate to previously visited pages.
Something like 'Back' button. On click of this, user can see what are the pdf pages he has visited previously.
Many Thanks,
Divya
I have a CellTemplate with DataTemplate.Triggers defined:
<Window.Resources>
<DataTemplate x:Key="ActiveGraphic">
<StackPanel>
<Control x:Name="icon" Template="{StaticResource addImage}" />
</StackPanel>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding Path=Enabled}" Value="True">
<Setter TargetName="icon" Property="Template" Value="{StaticResource addImage}"/>
</DataTrigger>
<DataTrigger Binding="{Binding Path=Enabled}" Value="False">
<Setter TargetName="icon" Property="Template" Value="{StaticResource deleteImage}" />
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
and GridViewDataColumn:
<telerik:GridViewDataColumn Header="Activated" DataMemberBinding="{Binding Path=Enabled}" CellTemplate="{StaticResource ActiveGraphic}" />
DataTemplate.Traggers doesn't fire and Template property never changes from default.
Hi!
I want to have a pane without a header, but in this case the user cannot drag the pane. Is there a way to initiate the drag from code or maybe some other way to do this?
We currently are using SQL Server Analysis services as the back end and using Telerik for WPF to display various Pivot Tables from the SQL Server cubes. We provide Telerik control with a Connection settings object via the AdomdDataProvider class to provide connection information as follows
"Provider=MSOLAP.5;User Id=genericuserid;Password=[password];Data Source=[servername];Initial Catalog=[cubename]Timeout=360
The issue we are having is that we are finding that unless that actual Windows domain user (i.e. the person logged in) has access (via a role defined in the SQL Server cube) then they are refused access even if the user id in the connection string (in this example 'genericuserid') does have full admin privileges, In other words it seems that SQL Server for the purposes of getting at the CUBE data is ignoring the user id passed in the connection string and always using the domain user id.
Is there anyway I can force SQL Server to use the 'genericuserid' so I do not have to explicitly give users access via a role.
Thanks

I am looking for maintaining the same recent color list for all the RadColorPicker instances which we have in application. e. g. if user creates a custom color from one colorpicker (and colorEditor) control, user doesn't have to do the same for another color pickers. User should see the same color in recent colors for the all the color pickers.
I am trying to figure out, how to implement it. I see the property RecentColorsItemsSource, which could be of use here , but then, I am not able to get it working. I am trying to set sample colors in the code behind like this:
void radColorPicker_Loaded(object sender, RoutedEventArgs e)
{
radColorPicker.RecentColorsItemsSource = new List<Color> { Colors.Red, Colors.Pink };
}
but with this code I am getting this error:
"Object reference not set to an instance of an object."}
at Telerik.Windows.Controls.RadColorSelector.BindRecentColorsPalette()
at Telerik.Windows.Controls.RadColorSelector.BindXamlElements()
at Telerik.Windows.Controls.RadColorSelector.OnApplyTemplate()
at System.Windows.FrameworkElement.ApplyTemplate()
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Control.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Border.MeasureOverride(Size constr
Some help here would be appreciable.
