Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
540
Adding spinner to XamTreeItem
posted

I will upload the project asap..I have one quetsion regarding XAMTree...I want to add a Spinner control to xamtreeitem and than make it visible only for the selected tree node..

I have added this in style of xamtreeitem

<Controls1:EPMWaitControl x:Name="WaitAnimation" IsEnabled="true" Grid.Row="0" Grid.Column ="4" Canvas.ZIndex="999" DataContext="{Binding}" VerticalAlignment="Top" AnimationBackColor ="Red" />

in

<Grid x:Name="MouseHitArea" Background="Transparent" Grid.Row ="0"><Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius ="2"/>
<Border x:Name="MouseOver1" BorderBrush="{StaticResource ItemHottrackOuterBorderFill}" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource ItemHottrackCenterFill}" CornerRadius="2" Opacity ="0"/>
<Border x:Name="Selected1" BorderBrush="{StaticResource ItemSelectedOuterBorderFill}" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource ItemSelectedCenterFill}" CornerRadius="2" Visibility ="Collapsed"/>
<Rectangle x:Name="FocusRectangle" Fill="Transparent" IsHitTestVisible="False" StrokeDashOffset="10" StrokeDashCap="Round" Stroke="Black" StrokeThickness="1" StrokeDashArray="1 5" Visibility ="Collapsed"/>
<igPrim:ExpansionIndicator x:Name="ExpansionIndicator" IndicatorVisibility="Collapsed" IsExpanded="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="{Binding Level, ConverterParameter=15, Converter={StaticResource LeftMarginConverter}, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent }}">
<Border>

<Grid Background ="Transparent">
<Grid HorizontalAlignment ="Left">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5"/>
<ColumnDefinition />
<ColumnDefinition Width ="Auto"/>
<ColumnDefinition Width ="Auto"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>

<ContentControl x:Name="ExpandedIcon" Grid.Column="1" HorizontalContentAlignment="Stretch" Opacity="1" VerticalContentAlignment="Stretch"/>
<ContentControl x:Name="CollapsedIcon" Grid.Column="1" HorizontalContentAlignment="Stretch" Opacity="0" VerticalContentAlignment="Stretch"/><CheckBox x:Name="CheckBox" Grid.Column="2" VerticalAlignment="{TemplateBinding VerticalAlignment }"/>
<ContentPresenter x:Name="Header" Content="{TemplateBinding Header}" Grid.Column="3" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment }"/>
<Controls1:EPMWaitControl x:Name="WaitAnimation" IsEnabled="true" Grid.Row="0" Grid.Column ="4" Canvas.ZIndex="999" DataContext="{Binding}" VerticalAlignment="Top" AnimationBackColor ="Red" />

</Grid>

I am trying to access the WaitAnimation control which I added to the style.So that I can make it visible/hide for a selected tree node. But I am not able to access this control as a xamtreeitem.??

I will appreciate quick reponse

Thanks

Parents
No Data
Reply
  • 540
    posted

    I will upload the project asap..I have one quetsion regarding XAMTree...I want to add a Spinner control to xamtreeitem and than make it visible only for the selected tree node..

    I have added this in style of xamtreeitem

    <Controls1:EPMWaitControl x:Name="WaitAnimation" IsEnabled="true" Grid.Row="0" Grid.Column ="4" Canvas.ZIndex="999" DataContext="{Binding}" VerticalAlignment="Top" AnimationBackColor ="Red" />

    in

    <Grid x:Name="MouseHitArea" Background="Transparent" Grid.Row ="0">

    <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius ="2"/>

    <Border x:Name="MouseOver1" BorderBrush="{StaticResource ItemHottrackOuterBorderFill}" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource ItemHottrackCenterFill}" CornerRadius="2" Opacity ="0"/>

    <Border x:Name="Selected1" BorderBrush="{StaticResource ItemSelectedOuterBorderFill}" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource ItemSelectedCenterFill}" CornerRadius="2" Visibility ="Collapsed"/>

    <Rectangle x:Name="FocusRectangle" Fill="Transparent" IsHitTestVisible="False" StrokeDashOffset="10" StrokeDashCap="Round" Stroke="Black" StrokeThickness="1" StrokeDashArray="1 5" Visibility ="Collapsed"/>

    <igPrim:ExpansionIndicator x:Name="ExpansionIndicator" IndicatorVisibility="Collapsed" IsExpanded="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="{Binding Level, ConverterParameter=15, Converter={StaticResource LeftMarginConverter}, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent }}">

    <Border>

    <Grid Background ="Transparent">
    <Grid HorizontalAlignment ="Left">
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="5"/>
    <ColumnDefinition />
    <ColumnDefinition Width ="Auto"/>
    <ColumnDefinition Width ="Auto"/>
    <ColumnDefinition />
    </Grid.ColumnDefinitions>

    <ContentControl x:Name="ExpandedIcon" Grid.Column="1" HorizontalContentAlignment="Stretch" Opacity="1" VerticalContentAlignment="Stretch"/>

    <ContentControl x:Name="CollapsedIcon" Grid.Column="1" HorizontalContentAlignment="Stretch" Opacity="0" VerticalContentAlignment="Stretch"/>

    <CheckBox x:Name="CheckBox" Grid.Column="2" VerticalAlignment="{TemplateBinding VerticalAlignment }"/>

    <ContentPresenter x:Name="Header" Content="{TemplateBinding Header}" Grid.Column="3" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalAlignment }"/>

    <Controls1:EPMWaitControl x:Name="WaitAnimation" IsEnabled="true" Grid.Row="0" Grid.Column ="4" Canvas.ZIndex="999" DataContext="{Binding}" VerticalAlignment="Top" AnimationBackColor ="Red" />

    </Grid>

    I am trying to access the WaitAnimation control which I added to the style.So that I can make it visible/hide for a selected tree node. But I am not able to access this control as a xamtreeitem.??

    I will appreciate quick reponse

    Thanks

Children
No Data