I have managed to set up a PRISM region within the radRibbonView.RadRibbonTab which then has radRibbonGroup's loaded in from the modules containing the buttons for that module. All good so far, however the modules donot load in the order which the radribbongroups need to appear in the tab.
I have tried using the radOrderedwrappanel in conjunction with the groupvariant priority as per snippit below to provide a solution with no luck. Is there a way of doing this or will I have to look into custom loading order of the modules?
I ahve also added a custom regionAdaptor which seems to be working fine to allow the radribbongroups to be loaded into the orderedwrappanel. However the ordering and sizing didnt work - it started wrapping after 3 ribbonGroups and it didnt order the groups correctly.
<
telerik:RadRibbonGroup
Header
=
" Order Search "
>
<
telerik:RadRibbonGroup.Variants
>
<
telerik:GroupVariant
Priority
=
"2"
Variant
=
"Large"
/>
</
telerik:RadRibbonGroup.Variants
>
<
telerik:RadOrderedWrapPanel
>
<
telerik:RadRibbonButton
LargeImage
=
"/Icons/48/Search.png"
Size
=
"Large"
telerik:ScreenTip.Title
=
"Order Search"
/>
</
telerik:RadOrderedWrapPanel
>
</
telerik:RadRibbonGroup
>
--- OnRowDragOver
var details = DragDropPayloadManager.GetDataFromObject(e.Data,
"DropDetails"
)
as
DropIndicationDetails;
--- OnDrop
var draggedItem = DragDropPayloadManager.GetDataFromObject(e.Data,
"DraggedItem"
);
var details = DragDropPayloadManager.GetDataFromObject(e.Data,
"DropDetails"
)
as
DropIndicationDetails;
private
void
SetMergeFieldReadOnly(MergeField field, RadRichTextBox richTextBox,
bool
isReadonly)
{
var fieldEnd = richTextBox.Document.EnumerateChildrenOfType<FieldRangeEnd>()
.FirstOrDefault(fs => (fs.FieldRangeStart.Field
is
MergeField)
&& (((MergeField)fs.FieldRangeStart.Field).PropertyPath == field.PropertyPath));
if
(fieldEnd !=
null
)
{
var fieldStart = fieldEnd.FieldRangeStart;
var posFieldStart =
new
DocumentPosition(richTextBox.Document);
var posFieldEnd =
new
DocumentPosition(richTextBox.Document);
posFieldStart.MoveToInline(fieldStart);
posFieldEnd.MoveToInline(fieldEnd);
if
(isReadonly)
// add readonlyrange
{
richTextBox.Document.Selection.Clear();
richTextBox.Document.Selection.SetSelectionStart(posFieldStart);
richTextBox.Document.Selection.AddSelectionEnd(posFieldEnd);
richTextBox.InsertReadOnlyRange();
}
else
// remove readonlyrange
{
// 1st method - doesn't work.
//richTextBox.Document.Selection.Clear();
//richTextBox.Document.Selection.SetSelectionStart(posDebField);
//richTextBox.Document.Selection.AddSelectionEnd(posFinField);
//richTextBox.DeleteReadOnlyRange(); // <-- no error but the field is still readonly after that.
// 2nd method - works but not properly
var readOnlyRangeStarts = richTextBox.Document.EnumerateChildrenOfType<ReadOnlyRangeStart>();
var posDebReadOnly =
new
DocumentPosition(richTextBox.Document);
var posFinReadOnly =
new
DocumentPosition(richTextBox.Document);
foreach
(var readOnlyRangeStart
in
readOnlyRangeStarts)
{
if
(readOnlyRangeStart.End !=
null
)
{
posDebReadOnly.MoveToInline(readOnlyRangeStart);
posFinReadOnly.MoveToInline(readOnlyRangeStart.End);
if
((posFinReadOnly >= posFieldStart) && (posDebReadOnly <= posFieldEnd))
{
richTextBox.DeleteReadOnlyRange(readOnlyRangeStart);
// remove the protection on ALL the readonly range !!!
}
}
}
}
}
}
Hello Telerik team,
I’m having trouble with hosting an Addin UI in RadDock.
I wrote a demo to reproduce this issue. download demo here
You can see if you unpin the RadPane, you will no longer be able to focus the textbox. I’m wondering if this is a known issue and is there any workaround for this?
I have read this (http://www.telerik.com/community/forums/wpf/docking/wpf-frame-control-not-visible-in-floating-window.aspx) and this (http://www.telerik.com/community/forums/wpf/docking/radpane-not-displaying-webbrowser-content-while-floating.aspx) threads to make the UI display in RadPane. But when RadPane is in unpinned state, the UI inside it is not able to be used. When I click it, the RadPane automatically hides.