Telerik Forums
UI for WPF Forum
0 answers
92 views
hi , I have done as per your doc shown here.
But I cannot get the add and delete buttons to show in the rad data form. i even tried implementing ieditable object etc. There is some complicated forum thread regarding implementing icollectionview etc. All I need is the add and delete buttons to show in addition to showing the raddataform in edit mode. (ok button enabled). I tried
<telerik:RadDataForm CurrentItem="{Binding CurrentItem,ElementName=RadGridView1}" 
no luck so far. Any simple solution to this ?
thankyou
Geena
Top achievements
Rank 1
 asked on 04 May 2012
2 answers
101 views
Is there a way to get notified when the user pans the digram? I didn't see an event that looked obvious to me and noticed that the RadDiagram does not implement the INotifyPropertyChanged interface so I can't get notified when the Viewport changes.
Eric
Top achievements
Rank 1
 answered on 04 May 2012
6 answers
886 views
Good evening,

How can I insert text into my RadRichTextBox / Document wrapped with custom annotations?

I have the following code, but it only works the first time the code is run. If I run the code a second time by inserted a second piece of text then the annotations aren't wrapped properly.
Please see my code & XAML output below.

Code to insert text and annotation:
//Focus RichTextBox - I have made my own Intellisense ListBox
radRichTextBox.Focus();
//Get Caret position (start position)
DocumentPosition startPosition = new DocumentPosition(radRichTextBox.Document);
//Insert text into document at caret position - text is from Intellisense ListBox selected item
radRichTextBox.Document.Insert(((Products)radListBox.SelectedItem).Name + ": ", radRichTextBox.Document.Style);
//Get caret position now text has been inserted (end position)
DocumentPosition endPosition = new DocumentPosition(this.radRichTextBox.Document);
//Adjust position of Intellisense ListBox to new Caret position
AdjustAutoCompletePosition();
//Reload Intellisense ListBox with new items based on previous selection
SetAutoCompleteListBoxItems(((Products)radListBox.SelectedItem).ID);
//Set Custom Annotation
SemanticRangeEnd rangeEnd = new SemanticRangeEnd();
SemanticRangeStart rangeStart = (SemanticRangeStart)rangeEnd.CreatePairedStart();
rangeStart.Name = "SemanticRange " + count++;
//Place annotation around newly inserted text - note start & end position
radRichTextBox.Document.InsertCustomAnnotationRange(startPosition, endPosition, rangeStart, rangeEnd);

Here is the XAML output when the code is run for the first time (this is correct as it should be):
<t:Paragraph>
  <custom1:SemanticRangeStart AnnotationID="1" Name="SemanticRange 0" />
      <t:Span FontFamily="Verdana" FontSize="16" FontStyle="Normal" FontWeight="Normal" Text="Appliances: " />
  <custom1:SemanticRangeEnd AnnotationID="1" />
</t:Paragraph>

If I run the code a second time to insert a second piece of text then I get the following output (this isn't what I want):
<t:Paragraph>
  <custom1:SemanticRangeStart AnnotationID="1" Name="SemanticRange 1" />
  <custom1:SemanticRangeEnd AnnotationID="1" />
  <custom1:SemanticRangeStart AnnotationID="2" Name="SemanticRange 0" />
     <t:Span FontFamily="Verdana" FontSize="16" FontStyle="Normal" FontWeight="Normal" Text="Appliances: " />
  <custom1:SemanticRangeEnd AnnotationID="2" />
 <t:Span FontFamily="Verdana" FontSize="16" FontStyle="Normal" FontWeight="Normal" Text="Hob: " />
</t:Paragraph>

This is the XAML output that I want to achieve (each piece of inserted text has it's on annotation range):
<t:Paragraph>
 <custom1:SemanticRangeStart AnnotationID="2" Name="SemanticRange 0" />
    <t:Span FontFamily="Verdana" FontSize="16" FontStyle="Normal" FontWeight="Normal" Text="Appliances: " />     
<custom1:SemanticRangeEnd AnnotationID="2" />
<custom1:SemanticRangeStart AnnotationID="1" Name="SemanticRange 1" />
    <t:Span FontFamily="Verdana" FontSize="16" FontStyle="Normal" FontWeight="Normal" Text="Hob: " />
<custom1:SemanticRangeEnd AnnotationID="1" /> 
</t:Paragraph>

I think the problem is that I'm not getting the correct start & end positions of the newly inserted text. Please see my c# code "positionStart" & "positionEnd".

Basically my application is an intellisense autocomplete application where the ListBox autcomplete items are drawn from a database. Thus I need the custom annotations to wrap around my text to relate it to the database ID tags. I haven't setup the proper annotation values yet, I'm just playing with the example code from a telerik demo project.

Any advice would be greatly appreciated.

I think I need to achieve the following:
  • Get Caret Position (start position)
  • Insert text into document
  • Get Carent Position (end position)
  • Apply annotation based on start & end positions

 

Thank you for your time,

Rob


************   EDIT   *************

I have tried setting the start and end positions like so but it still doesn't work:

C# Code to insert text & annotations:
//Get caret position (start)
DocumentPosition startPosition = this.radRichTextBox.Document.CaretPosition;
 
//Insert text into document at caret position - text is from Intellisense ListBox selected item
radRichTextBox.Document.Insert(((Products)radListBox.SelectedItem).Name + ": ", radRichTextBox.Document.Style);
 
//Get caret position now text has been inserted (end of text)
DocumentPosition endPosition = this.radRichTextBox.Document.CaretPosition;


XAML Output:
<t:Paragraph>
  <t:Span FontFamily="Verdana" FontSize="16" FontStyle="Normal" FontWeight="Normal" Text="Appliances: " />
  <custom1:SemanticRangeStart AnnotationID="1" Name="SemanticRange 0" />
  <custom1:SemanticRangeEnd AnnotationID="1" />
    <t:Span FontFamily="Verdana" FontSize="16" FontStyle="Normal" FontWeight="Normal" Text="Hob: " />
  <custom1:SemanticRangeStart AnnotationID="2" Name="SemanticRange 1" />
  <custom1:SemanticRangeEnd AnnotationID="2" />
    <t:Span FontFamily="Verdana" FontSize="16" FontStyle="Normal" FontWeight="Normal" Text="Electric: " />
  <custom1:SemanticRangeStart AnnotationID="3" Name="SemanticRange 2" />
  <custom1:SemanticRangeEnd AnnotationID="3" />
    <t:Span FontFamily="Verdana" FontSize="16" FontStyle="Normal" FontWeight="Normal" Text="Beko HIC64102" />
</t:Paragraph>




Robert
Top achievements
Rank 1
 answered on 04 May 2012
1 answer
168 views
Good evening,

Is there a list or information detailing what properties & methods can be overridden and the function they serve for the Annotation Ranges ?

For example I have SmanticRangeStart & SemanticRangeEnd classed with the following properties:

Range End
public override bool SkipPositionBefore
{
    get
    {
        return true;
    }
}
 
public override bool IsCopyable
{
    get
    {
        return true;
    }
}
 
public override AnnotationMarkerDeleteBehavior BackspaceBehavior
{
    get
    {
        return AnnotationMarkerDeleteBehavior.SelectAnnotation;
    }
}

Range Start
public override bool SkipPositionBefore
{
    get
    {
        return true;
    }
}
 
public override bool IsCopyable
{
    get
    {
        return true;
    }
}
 
public override bool SkipPositionsInRange
{
    get
    {
        return true;
    }
}

Any information would be very useful.

Thanks,

Rob



Iva Toteva
Telerik team
 answered on 04 May 2012
2 answers
208 views
Hi,

How do you get the custom annotation of a selected span?

For example:
<t:Paragraph>
  <custom1:SemanticRangeStart AnnotationID="1" Name="SemanticRange 0" />
     <t:Span FontFamily="Segoe UI" FontSize="14" FontStyle="Normal" FontWeight="Normal" Text="Appliances: " />
  <custom1:SemanticRangeEnd AnnotationID="1" />
  <custom1:SemanticRangeStart AnnotationID="2" Name="SemanticRange 1" />
     <t:Span FontFamily="Segoe UI" FontSize="14" FontStyle="Normal" FontWeight="Normal" Text="Dishwasher" />
  <custom1:SemanticRangeEnd AnnotationID="2" />
</t:Paragraph>

Suppose my select range covers the last span which contains the text "Dishwasher".
From the selection, how can I retrieve it's annotation programmatically?

Thank you for your time,

Rob
Robert
Top achievements
Rank 1
 answered on 04 May 2012
3 answers
118 views
Hi,

I use Telerik V2011.3.1220.35 and in my application I have multiple radgridview in multiple radwindow. I don't know why but with some radgridview, I have a problem when I try to use the filter icon in the columns headers. For those radgridview who I have problems with, when I click on the filter icon in columns header, a filters dialog appear, in the filter dialog, I can see a list of values that I can select or unselect without any problem but when I try to use the textbox to enter a value manually, the only char the textbox accept is the space!!!

I tried to compare one of my working radgridview with another one which is not working without any succes :(

PS: Each RadGridView are build dynamically at runtime, ie: Columns, Grouping, Sortings, etc...

Can you point me into a direction that I can check?

Thank's
Oliver
Top achievements
Rank 1
 answered on 04 May 2012
1 answer
203 views
Hi,

is it possible to disable the "edit series" (recurrence) in the Appointment Dialog? Thank'S a lot

Best regards
Rene
Annett
Top achievements
Rank 1
 answered on 04 May 2012
1 answer
123 views
Based on the example of the Demo Telerik SchedulerView (see included image).
I want to have grouping which will show different resources on every day.
Please guidance or code.

Annett
Top achievements
Rank 1
 answered on 04 May 2012
1 answer
110 views
Hi,

I add and remove some resources. That works fine. If i navigate to my scheduleview (its on a different tabitem) the added resources wouldn't be shown.
I try these solution http://www.telerik.com/community/forums/wpf/scheduleview/how-to-refresh-scheduleview-when-clearing-and-re-adding-to-resourcetype-resources.aspx and it works.
I do this on the ScheduleViewLoaded event. This is fired if i changed the tabitem.
void RadSchedViewLoaded(object sender, RoutedEventArgs e)
{
    var scheduleViewModel = DataContext as ScheduleViewModel;
    if (scheduleViewModel != null)
    {
        scheduleViewModel.RefeshAppointmentSettings();
 
        var groupDescriptionsSource = _radSchedView.GroupDescriptionsSource;
        _radSchedView.ClearValue(RadScheduleView.GroupDescriptionsSourceProperty);
        _radSchedView.SetValue(RadScheduleView.GroupDescriptionsSourceProperty, groupDescriptionsSource);
 
    }
}

But somehow it crashes my style. See in my added picutres. The rows are greater after adding (afteraddingresource.jpg) and if i navigate the week up and down (afteraddingresourceandchangingvisibiblerange.jpg) it looks correct again.

What can i do? Can i set for example somehow the resource.MaxHeight?

Thanks
Annett
Annett
Top achievements
Rank 1
 answered on 04 May 2012
2 answers
119 views
Hi,

I have multi-level nested grid view and all the nested grids are expanded by default.
When i sort the first level items, all the child/nested levels are collapsed.
Is there any way to retain the expanded mode for all the child levels after sorting?

Thanks
Thangalskhmi
Top achievements
Rank 1
 answered on 04 May 2012
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?