Referring the control of one page from the other

4 posts, 0 answers
  1. Ramyashree
    Ramyashree avatar
    29 posts
    Member since:
    Jan 2011

    Posted 10 Mar 2011 Link to this post

    Hi,
      I have a main page with an image in it... It has got a menu control and a frame .. On selecting the menu item, I'm using navigate property of the frame to display the required page.... Now I need to provide an option in this page to change the image of the main page.... Is there any way of achieving it..?

    Thanks in advance,
    Ramya
         
  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 10 Mar 2011 Link to this post

    Hello Ramyashree,

    There probably is a way, but we need more detailed information before we can show you how. Where is this option supposed to come from? If it's from the HTML, can you show us the HTML it needs to be extracted from? How is the option supposed to be feed into the page? Does it get appended to the URL? What's an example of what the URL is supposed to look like?

    Regards,
    Cody
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. Ramyashree
    Ramyashree avatar
    29 posts
    Member since:
    Jan 2011

    Posted 11 Mar 2011 Link to this post

    The xaml code of my main page contains the following code

    <Image HorizontalAlignment="Left" Margin="8,8,0,18" Width="103" Source="Images/logo.jpg" Stretch="None"/> 
      
     <telerik:RadMenu  VerticalAlignment="Bottom" 
                             HorizontalAlignment="Left" ItemContainerStyle="{StaticResource ItemStyle}"
                             Margin="138,0,0,2" FontSize="11" 
                             Foreground="White"  Background="Transparent" 
                             ItemTemplate="{StaticResource MenuItemTemplate}" ItemsSource="{Binding Items, Mode=TwoWay}"
                            Orientation="{Binding IsChecked, ElementName=HorizontalOrientation, Converter={StaticResource                      BooleanToOrientationConverter}}"
        ClickToOpen="{Binding IsChecked, ElementName=ClickToOpen}"  x:Name="RadMenu"
        IconColumnWidth="{Binding Value, ElementName=IconColumnWidth}"
        NotifyOnHeaderClick="{Binding IsChecked, ElementName=NotifyOnHeaderClick}" ItemClick="RadMenu_ItemClick">

    </telerik:RadMenu>

    And in the code behind based on the menu selected, the navigation is done as follows

    if (menuHeader == "Settings")
       {
           mainFrame.Navigate(new Uri("/Screens/Views/SettingsView.xaml", UriKind.Relative));
       }

    In "Settings" page I need to provide an option to change logo (image) in the main page..

    Does it explain my need clearly...?

  4. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 16 Mar 2011 Link to this post

    Hi Ramyashree,
        Test Studio can do anything that a regular (i.e. human) user can do in a browser. The image in your main page is a part of the HTML code:
    <Image HorizontalAlignment="Left" Margin="8,8,0,18" Width="103" Source="Images/logo.jpg" Stretch="None"/>

    Test Studio can't change the actual HTML code of a page (just like a regular user wouldn't be able to edit an HTML page directly from the browser). Instead you will need to develop some sort of implementation that changes this image and then just have Test Studio trigger this implementation.

    For instance:
    You can create an ASP .Net application on the non-main page. The front end of the application would consist of a button. The backend would invoke the necessary logic on your server to make it change the image on the main page. Then your test would just push the button.

    I hope this helps!

    Kind regards,
    Stoich
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!