Telerik Forums
UI for WPF Forum
1 answer
184 views
Hi

I need to extract text from a ranges of DocumentElements.
For example the text between a BookmarkRangeStart and its paired BookmarkRangeEnd.

My solution is to walk from NextSibling to NextSibling, check the siblings to be of type Span
and get the text. If they are not Spans I recursively walk through the Children collection
and of the sibling, check these to be spans, if not recurse again etc or quit if there are no Children
unti I reach the BookmarkRangeEnd as the last Sibling.
This seems to work.
Questions:
1) is there an easier / more reliable way to get the text of "range" of elements?
(I use TextFormatter.Export for complete Documents, but not for parts)
2) is text always located inside Spans?
3) Can Spans be nested - If so, does the Text property of the "parent" Span contain
the Text content of all "child" spans? (Like InnerText in HTML)?
4) Is there a straight forward way to get the text from a Table as a CSV / TSV string?

Grettings,
Chris
Iva Toteva
Telerik team
 answered on 24 Feb 2012
2 answers
253 views
Hi

we have a problem with the RadWindow while dragging it with the mouse.
It only happens when you have "show window content while dragging" enabled in the windows-system preferences.

I think I don't have to attach an example, because it also happens in the "WPF Controls Examples".
The problem only occurs when the RadWindow is very large. So if you resize the RadWindow from the "Frist Look" example to cover nearly the entire size of the monitor and try to drag it around with the mouse, it lags behind the mouse enormously.

If you have a high resolution (e.g. 1920 x 1080), a big RadWindow (which covers nearly the entire screen) lags more then a big RadWindow on 1024x768 while dragging.

Is there a way to fix this?
chp
Top achievements
Rank 1
 answered on 24 Feb 2012
1 answer
134 views

Hi everyone,

 

I’m using the 2011 Q2 WPF package.

Is it possible to remove the background to create a very simple style.
Like the styles from the new Telerik gauges?
 

Thanks!

 

greetings,

Christian

Andrey
Telerik team
 answered on 24 Feb 2012
1 answer
123 views
Hi,

I add appointments programmaticaly to the appointmentslist and calculate the end new. If i calculate an end which is smaler than 1 hour (MinorTickLength = 1h) the ScheduleView shows me anyhow the appointment with 1h lenght. My tooltip shows me the real start and end but the scheduleview appointment-bar not. I set the BeginEdit and Commit things and i remove and add the appointments again to the property, but always he shows me the appointment-bar wrong.

Look at my picture. In this example i have 2 Appointments but it looks like 3 Appointments. What is the little shadow over the green appointment? These "shadow" has the rigth length.

I want that an appointment end is 12:59 pm or the start of the next appointment diff 1 minute. No overlapping!

Here my code:
this is the calculating in method
private void RefeshAppointmentSettings()
{
// ... do some stuff
 
    CustomAppointment previous = null;
    var i = 0;
    foreach (var custSorted in toSort)
    {
        if (i > 0)
        {
            if (previous != null)
            {
                previous.End = custSorted.Start.AddMinutes(-1);
            }
        }
        previous = custSorted;
        previous.End = previous.Start.Date.AddDays(1).AddMinutes(-1);
        i++;
    }
    Appointments.AddRange(toSort);
// ... do some stuff
}

this is the caller event:
private void SwitchTimeSpecialTimeTLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
{
    var scheduleViewModel = DataContext as ScheduleViewModel;
    if (scheduleViewModel != null)
    {
        scheduleViewModel.RefeshAppointmentSettings();
        _radSchedView.BeginEdit();
        var arr = new CustomAppointment[scheduleViewModel.Appointments.Count];
        scheduleViewModel.Appointments.CopyTo(arr, 0);
        scheduleViewModel.Appointments.Clear();
        for(int i = 0;i<arr.Length;i++)
        {
            scheduleViewModel.Appointments.Add(arr[i]);
        }
        _radSchedView.Commit();
    }
}

Thanks

Annett
Annett
Top achievements
Rank 1
 answered on 24 Feb 2012
1 answer
59 views
Hi,

I wonder if someone have the same problem like me. I have set the Minor and MajorTickLength of scheduleview in xaml. And every time if i type the = and VS 2010 wants to open the intellisense for these properties the VS 2010 crashes. To use these properties in xaml i must type the code including the values in an editor like Notepad and copy/paste it to the xaml-file.

Is this a bug of VS or of the control? Any other intellisense works.
VS2010, Win7x64, RadControls_for_WPF40_2011_2_0920

Thanks

Annett
Yana
Telerik team
 answered on 24 Feb 2012
2 answers
147 views
Hello,
I use the two methods provided in the sample for saving a raddocking

private string SaveLayoutAsString(RadDocking instance)
     {
         MemoryStream stream = new MemoryStream();
         instance.SaveLayout(stream,true);
 
         stream.Seek(0, SeekOrigin.Begin);
 
         StreamReader reader = new StreamReader(stream);
         return reader.ReadToEnd();
     }
 
     private void LoadLayoutFromString(string xml, RadDocking instance)
     {
         using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes(xml)))
         {
             stream.Seek(0, SeekOrigin.Begin);
             instance.LoadLayout(stream,true);
         }
     }

When I restore to the saved status I've the SerializationTag to null (I've also tried to set the tag field but it's the same, it's not serialized)
Any suggestion, reason it's happening?

Thanks
Michele
Top achievements
Rank 2
 answered on 24 Feb 2012
5 answers
597 views
Hi,

I have a RadGridView grouped on a property of the binding object.

GroupDescriptor phaseDescriptor = new GroupDescriptor();
phaseDescriptor.Member = "PhaseName";
this.grdScope.GroupDescriptors.Insert(0, phaseDescriptor);

The collection of object bound to grid is "Task" with a property "PhaseName"

The Task object contains another property of type  "Phase" whose Name property is same as Task's PhaseName property.

The type Phase defines another property "Index". I want to sort the Groups according to this index. Right now I can only sort the groups ascending or descending based on PhaseName only.

Any ideas?
Karan
Top achievements
Rank 1
 answered on 24 Feb 2012
1 answer
83 views
Hi,

When we use a RibbonWindow with Backstage, and open the backstage view, we can't change the size of the window using the mouse. Only minimizing and maximizing works. If we close backstage the window is sizable again. This is reproducible on the RibbonWindow sample of  Rad Controls for WCF Q1 2012.

Thank you

Ioannis
Petar Mladenov
Telerik team
 answered on 24 Feb 2012
2 answers
350 views
Hi,

This looks like a great control. Well done for creating it.

Just working through the Getting Started tutorial http://www.telerik.com/help/wpf/radganttview-getting-started.html , however, when I run it the Collection isn't binding to the control. It doesn't display the Tasks as shown. Could you please post the complete C# code for me to check?
Thanks.
Al
Alan
Top achievements
Rank 1
Iron
 answered on 24 Feb 2012
5 answers
302 views
I have a collection of custom appointment objects bound to my scheduleView.  I created a datatemplate for the custom tooltip and applied to the tooltiptemplate property, however, the default tooltip is still displaying and not my custom data template.
<telerik:RadScheduleView x:Name="_scheduleView" Margin="2,0,0,0"
                                  RenderTransformOrigin="0.5,0.5"
                                  SelectedAppointment="{Binding SelectedStreamingEpisodeAppointment, Mode=TwoWay}"
                                  AppointmentsSource="{Binding StreamingEpisodeAppointments}"
                                  telerik:StyleManager.Theme="Windows7"
                                  SnapAppointments="True"
                                  MinAppointmentWidth="60" ToolTipTemplate="{StaticResource AppointmentToolTipTemplate}">
              
             <telerik:RadScheduleView.RenderTransform>
                 <TransformGroup>
                     <ScaleTransform />
                     <SkewTransform />
                     <RotateTransform />
                     <TranslateTransform />
                 </TransformGroup>
             </telerik:RadScheduleView.RenderTransform>
             <telerik:RadScheduleView.ViewDefinitions>
                                     <telerik:TimelineViewDefinition  MinorTickLength="1day"
                                                  MajorTickLength="1day"
                                                  TimerulerGroupStringFormat="{}{0:MM/dd/yyyy}"
                                                  MinTimeRulerExtent="1" MaxTimeRulerExtent="Infinity"
                     StretchAppointments="True" StretchGroupHeaders="True" />
             </telerik:RadScheduleView.ViewDefinitions>
             <telerik:RadScheduleView.GroupDescriptionsSource>
                 <telerik:GroupDescriptionCollection>
                     <telerik:DateGroupDescription/>
                 </telerik:GroupDescriptionCollection>
             </telerik:RadScheduleView.GroupDescriptionsSource>
 
         </telerik:RadScheduleView>

<DataTemplate x:Key="AppointmentToolTipTemplate">
               <Grid MaxWidth="300">
                   <Grid.ColumnDefinitions>
                       <ColumnDefinition Width="43" />
                       <ColumnDefinition />
                   </Grid.ColumnDefinitions>
                   <Grid.RowDefinitions>
                       <RowDefinition />
                       <RowDefinition />
                       <RowDefinition />
                   </Grid.RowDefinitions>
                   <TextBlock Text="{Binding Subject}" Grid.ColumnSpan="2" TextWrapping="Wrap" Margin="5 8 4 3" FontWeight="Bold" />
                   <Image Grid.Row="1"  VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5 5 0 0" Source="/Fox.Fbc.Vps.PL.Resources;component/Images/AcrossTime.png" Width="28" Height="29" />
                   <StackPanel Orientation="Vertical" Grid.Column="1" Grid.Row="1" Margin="0 5 0 0">
                       <StackPanel Orientation="Horizontal" Margin="0 0 0 0">
                           <TextBlock Text="{Binding Start, StringFormat='hh:mm tt'}" TextWrapping="Wrap" FontSize="10" />
                           <TextBlock Text=" - " FontSize="10" />
                           <TextBlock Text="{Binding End, StringFormat='hh:mm tt'}" TextWrapping="Wrap" FontSize="10" />
                       </StackPanel>
                       <TextBlock Text="{Binding Start, StringFormat='dddd dd MMM yyyy'}" Margin="0 3" FontSize="10" />
                   </StackPanel>
                   <TextBlock Grid.Row="2" Grid.ColumnSpan="2" Text="{Binding Body}" Margin="5 3 5 8" TextWrapping="Wrap"  />
               </Grid>
           </DataTemplate>

Dani
Telerik team
 answered on 24 Feb 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?