RadHtmlPlaceholder not firing Events

2 posts, 0 answers
  1. jorex
    jorex avatar
    16 posts
    Member since:
    Jan 2009

    Posted 30 Mar 2009 Link to this post

    Hi,

    First of all, i don't know where to post this thread becuase there is no category for RadHtmlPlaceholder  for Silverlight.

    Issue is that i have declared an event for RadHtmlPlaceholder and it is not firing it's event... The thing is i want to get the coordinates when mouse is pressed. Also, how would i insert an image overlapping the HtmlPlaceholder sort of a second layer?

    by the way the image is populated from the Database so i had it on the HtmlPlaceHolder compared to using the native Image and ImageBrush controls for Silverlight.

    Thank you and waiting for your response... :)

    i have the following code below: 

     

     

    <Grid>

     

        <ScrollViewer Margin="10" BorderThickness="0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">

     

        <StackPanel Orientation="Horizontal">

     

     

     

            <StackPanel x:Name="rootElement" >

     

     

     

                <TextBlock HorizontalAlignment="Stretch" VerticalAlignment="Top" Text="Question" TextWrapping="Wrap" Margin="7.5,8,8.5,0" TextAlignment="Left" x:Name="Question" FontWeight="Bold" FontFamily="Portable User Interface" Height="54"/>

     

     

     

                <telerik:RadHtmlPlaceholder HorizontalAlignment="Left" x:Name="RadHtmlPlaceholder2"

     

     

    MouseLeftButtonDown="RadHtmlPlaceholder2_MouseLeftButtonDown" MouseLeftButtonUp="RadHtmlPlaceholder2_MouseLeftButtonUp">

     

                <Line x:Name="lineStroke" Stroke="Red" StrokeThickness="5"></Line>

     

     

     

                </telerik:RadHtmlPlaceholder>

     

     

     

           </StackPanel>

     

     

     

        </StackPanel>

     

     

     

        </ScrollViewer>

     

     

     

    </Grid>

     

     

     

     

    Codebehind:

     

     

    private

     

    void RadHtmlPlaceholder2_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)

    {

    startPointx = e.GetPosition(

    this.RadHtmlPlaceholder2).X.ToString();

     

     

    startPointy = e.GetPosition(

    this.RadHtmlPlaceholder2).Y.ToString();

     

     

    }

     

     

    private void RadHtmlPlaceholder2_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)

    {

    endPointx = e.GetPosition(

    this.RadHtmlPlaceholder2).X.ToString();

     

     

    endPointy = e.GetPosition(

    this.RadHtmlPlaceholder2).Y.ToString();

     

     

     

    if (startPointx != null)

    {

    lineStroke.X1 =

    Convert.ToDouble(startPointx);  

     

     

    lineStroke.X2 =

    Convert.ToDouble(endPointx);  

     

     

    lineStroke.Y1 =

    Convert.ToDouble(startPointy);

     

    lineStroke.Y2 =

    Convert.ToDouble(endPointy);

     

     

    startPointx =

    string.Empty;

     

    startPointy =

    string.Empty;

     

     

    }

    }

     

     

  2. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 30 Mar 2009 Link to this post

    Hi jorex,

    Currently the scenario you describe is not supported by RadHtmlPlaceholder. You cannot have elements overlapping the control.

    All the best,
    Tihomir Petkov
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top