looking for an event name

4 posts, 0 answers
  1. zalak m
    zalak m avatar
    11 posts
    Member since:
    Nov 2009

    Posted 11 Aug 2010 Link to this post

    Hi,

    I am looking for an event which displays the a new panel when there is a mouse move on the expanded treeviewitem.

    Thanks,
    Zalak
  2. Hristo
    Admin
    Hristo avatar
    352 posts

    Posted 13 Aug 2010 Link to this post

    Hello zalak m,

    Can you elaborate on your issue a little bit more? Are you looking for expand on mouse move?

    Regards,
    Hristo Milyakov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. zalak m
    zalak m avatar
    11 posts
    Member since:
    Nov 2009

    Posted 13 Aug 2010 Link to this post

    Hi,

    I want to first expand the first level of the RadTreeView and the want to capture the mousemove of the second level in the RadTreeView.

    Thanks.
  5. Hristo
    Admin
    Hristo avatar
    352 posts

    Posted 18 Aug 2010 Link to this post

    Hi zalak m,

    You can attach an event handler to the MouseMove event of the data template content objects. Following code demonstrates what I mean:

    <HierarchicalDataTemplate x:Key="PersonTemplate" ItemTemplate="{StaticResource TaskTemplate}"
            ItemsSource="{Binding Tasks}">
        <Border Background="Azure" Margin="0" Width="140" Height="20" MouseMove="Border_MouseMove">
            <StackPanel>
                <TextBlock Text="{Binding Name}" />
            </StackPanel>
        </Border>
    </HierarchicalDataTemplate>

    Lets say our tree is composed of 3 levels, where the first level are the Teams, second are the Members of that teams and third are the tasks for each person. You can register event handler to the content of the data template for the second tree level. In current example this is the MouseMove event of the Border element inside the HierarchicalDataTemplate "PersonTemplate".

    If you don't know the structure of the tree in advance, probably you are going to need some mechanism to distinguish if the item is on second level or not.

    Also, I'm attaching a working sample demonstrating how to programmatically expand tree item and how to handle the mouse move over second level items in the tree view.

    Kind regards,
    Hristo Milyakov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top