Hi team,
In order to make my problem clear, I would list what I've done currently.
1. I am using MVVM, so I have view models of nodes, links and a graph source. All these implementations follow the guideline of RadDiagram MVVM. And it works fine.
2. Then I want to define some custom connectors. According to this thread, I manage to add custom connectors to my digram.
3. The solution of that thread mentioned above is using a attached property. And I also have a requirement: I need to remove or add nodes runtime. So I have following codes
if
(
this
._graphSource ==
null
)
{
this
._graphSource =
new
LineGraph();
}
this
._graphSource.Clear();
this
._graphSource.PopulateGraph(
this
);
return
this
._graphSource;
And when my application starts up for the first time, the offsets of the custom connectors work properly. However, when I add or remove nodes, the above if statement wouldn't be executed, it would clear all the nodes existed, and re-populate the graph again. However, the offsets don't take effect now. Removing the if statement, then the offset works no matter I add or delete nodes.
The key is I don't want to create the LineGraph object each time I delete or add nodes.
Hope make myself clear.
Best Regards,
Jingfei
Is it possible to specify the fill direction explicitely?
At the moment, when displaying an Area series, the series is filled between the graph and zero. However, I sometimes need the filled area to be above or below the graph, independent of the actual value.
Alex
Where can I find source code of RadControl's WPF demo? I have already downloaded and installed demo on my local system. I am looking for a Visual Studio 2013 project solution.
Thanks.
This may be about JustCode but its really about WPF. So, move this entry if you think it'd be better serviced elsewhere.
Do you have a tool that will highlight Binding errors? I realize that Binding is hard because its not until the control is bound that we know if it worked or not. Right now, the only way to tell is by watching Visual Studio's lame Output window... then, its hard to spot the exceptions.
Even if it is after the code is started, it'd be awesome to have a tool that would list and allow navigation to controls that encountered a Binding error.
Thanks,
Joel
Hi,
I'm building a DLL which include multiples usercontrols and multiples Telerik Controls and I would like to know if it's possible to define the Office2013 theme at one place for my whole DLL instead of declaring it in each usercontrol which contain a Telerik Control???
Thank's
Alain
[TypeDescriptionProvider(
typeof
(Mono3DPropertiesTypeDescriptorProvider))]
public
class
Mono3DPropertiesWrapper
{
public
readonly
Monogram.Mono3D.Control Control;
public
Mono3DPropertiesWrapper(Monogram.Mono3D.Control control)
{
if
(control ==
null
)
{
throw
new
ArgumentNullException(
"control"
);
}
Control = control;
}
}
public
class
Mono3DPropertiesTypeDescriptorProvider : TypeDescriptionProvider
{
public
Mono3DPropertiesTypeDescriptorProvider()
:
base
(TypeDescriptor.GetProvider(
typeof
(Mono3DPropertiesWrapper)))
{
}
public
override
ICustomTypeDescriptor GetTypeDescriptor(Type objectType,
object
instance)
{
//HERE IS THE PROBLEM: instance IS NULL. CALLSTACK IS BELLOW
return
new
Mono3DPropertiesTypeDescriptor(instance);
}
}
public
class
Mono3DPropertiesTypeDescriptor : CustomTypeDescriptor
{
private
readonly
object
instance;
public
Mono3DPropertiesTypeDescriptor(
object
instance)
{
this
.instance = instance;
}
...
}
Hi
I'm using RadBook and Pdf viewer as follow:
Xaml Code:
<
UserControl.Resources
>
<
DataTemplate
x:Key
=
"LeftPageTemplate"
>
<
Viewbox
>
<
Grid
>
<
UI:FixedDocumentSinglePagePresenter
Page
=
"{Binding}"
Width
=
"325"
Height
=
"447"
FlowDirection
=
"LeftToRight"
/>
<
hosts:DrawingCanvas
Width
=
"325"
Height
=
"447"
Margin
=
"15"
Background
=
"#00000000"
FlowDirection
=
"LeftToRight"
/>
</
Grid
>
</
Viewbox
>
</
DataTemplate
>
</
UserControl.Resources
>
<
telerik:RadBusyIndicator
x:Name
=
"BusyIndicator"
>
<
telerik:RadBook
x:Name
=
"book"
LeftPageTemplate
=
"{StaticResource LeftPageTemplate}"
RightPageTemplate
=
"{StaticResource LeftPageTemplate}"
IsVirtualizing
=
"True"
IsKeyboardNavigationEnabled
=
"True"
HorizontalAlignment
=
"Center"
VerticalAlignment
=
"Center"
FirstPagePosition
=
"Right"
HardPages
=
"None"
Margin
=
"10"
BorderThickness
=
"1"
BorderBrush
=
"{telerik:Windows8Resource ResourceKey=BasicBrush}"
/>
</
telerik:RadBusyIndicator
>
C# Code:
public
void
LoadFile(Stream stream)
{
BusyIndicator.IsBusy =
true
;
var UISyncContext = TaskScheduler.FromCurrentSynchronizationContext();
var task =
new
Task<RadFixedDocument>(() => LoadPdf(stream));
task.ContinueWith(t =>
{
book.ItemsSource = t.Result.Pages;
TotalPages = t.Result.Pages.Count;
BusyIndicator.IsBusy =
false
;
}, UISyncContext);
task.Start();
}
private
RadFixedDocument LoadPdf(Stream stream)
{
return
new
PdfFormatProvider(stream, FormatProviderSettings.ReadOnDemand).Import();
}
Everything seems to work fine!
But the problem is when I Load a file and start browsing pages, and monitor it on Task Manager, memory grows too high (i.e. more than 2GB)
Look at the attached files, one from Task manager and one from ANTS Memory Profiler!
What's wrong with my code? Should I do some extra work like releasing objects, pages, ... any thing!?
When using the Telerik example from http://docs.telerik.com/devtools/wpf/controls/dragdropmanager/how-to/howto-draganddrop-within-radgridview.html dragging an item to the empty space in the RadGridView causes the row to go to the top of the list. Is this the desired behavior? Is there a way to disable it?
I have attached a picture of dragging to the whitespace. The "spike" row is the last row. If I drag the "spike" row to the bottom whitespace, the "spike" row will become the top row in the list.