TimeBar: Drag&Drop appointmentItem in RadScheduleView - disable date(hh:mm) in left top and bottom right corner

3 posts, 0 answers
  1. Andrei
    Andrei avatar
    3 posts
    Member since:
    Mar 2012

    Posted 15 Mar 2012 Link to this post

    Hello,

         I'm a very novice user of Telerik TimeBar control. For begining I would like to hide the start and end times (hours&minutes) in the appointmentItem while drag&drop(please see attached image).
         Any help/suggestion are welcomed.  
      
       Thanks in adance!

    Andrei

  2. Andrei
    Andrei avatar
    3 posts
    Member since:
    Mar 2012

    Posted 15 Mar 2012 Link to this post

    Hello,

         Meanwhile I had search and found out how it can be done (please see code below). I did not remove the text boxes since I plan to add another information there.
         But still I have one question: Isn't there any other way to only set Text="" for start and end textBox instead creating again the entire style?

    Regards,
    Andrei
    <telerik:RadScheduleView.DragDropHighlightStyle>
         <Style TargetType="telerik:HighlightItem">
             <Setter Property="BorderBrush" Value="{StaticResource DecorationRectangleOuterBorder_DragOver_custom}" />
             <Setter Property="Background" Value="{StaticResource DecorationRectangleBackground_DragOver_custom}" />
             <Setter Property="BorderThickness" Value="1" />
             <Setter Property="Template">
                 <Setter.Value>
                     <ControlTemplate>
                         <Border BorderBrush="Black">
                             <Grid>
                                 <Border BorderBrush="{StaticResource DecorationRectangleInnerBorder_DragOver_custom}" BorderThickness="1" />
                                 <Path Width="8" Height="8" Margin="-2" HorizontalAlignment="Left" VerticalAlignment="Top">
                                     <Path.Data>
                                         <GeometryGroup>
                                             <EllipseGeometry RadiusX="2" RadiusY="2" Center="2 2" />
                                             <LineGeometry StartPoint="3 3" EndPoint="8 8" />
                                         </GeometryGroup>
                                     </Path.Data>
                                 </Path>
     
                                 <TextBlock x:Name="StartTextBox" Margin="4 2" Foreground="Black" HorizontalAlignment="Left" VerticalAlignment="Top" Text=""/>
                                 <Path Width="8" Height="8" Margin="-2" HorizontalAlignment="Right" VerticalAlignment="Bottom">
                                     <Path.Data>
                                         <GeometryGroup>
                                             <EllipseGeometry RadiusX="2" RadiusY="2" Center="6 6" />
                                             <LineGeometry StartPoint="0 0" EndPoint="5 5" />
                                         </GeometryGroup>
                                     </Path.Data>
                                 </Path>
                                 <TextBlock x:Name="EndTextBox" Margin="4 2" Foreground="Black" HorizontalAlignment="Right" VerticalAlignment="Bottom" Text=""/>
                             </Grid>
                         </Border>
                     </ControlTemplate>
                 </Setter.Value>
             </Setter>
         </Style>
     </telerik:RadScheduleView.DragDropHighlightStyle>
  3. DevCraft banner
  4. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 20 Mar 2012 Link to this post

    Hi Andrei,

    I am glad that you've found the solution by yourself.  I am afraid that setting the DragDropHighlightStyle is the only way to customize the required text.

    Kind regards,
    Yana
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top