0
longlistselector ...를 클릭하면 longlistselector에서 통화 중 표시기를 표시하는 방법 아래 코드를 게시했습니다.선택한 항목이 변경되면 longlistselector에서 통화 중 표시기를 표시하는 방법은 무엇입니까?
항상 첫 번째 항목을 표시하고 있지만 어떤 항목을 클릭하는지 보여주고 싶습니다.
<StackPanel x:Name="top" Height="54" Orientation="Horizontal" Margin="-13,0,0,0" VerticalAlignment="Top" Background="#FF0FA3C0">
<TextBlock TextWrapping="Wrap" Text="{Binding InspectionNumber}" Foreground="#FFF4F4FA" VerticalAlignment="Top" FontSize="26.667" Margin="10,0" Width="200"/>
<StackPanel Orientation="Horizontal">
<TextBlock TextWrapping="Wrap" Text="{Binding Status}" FontSize="21.333" FontWeight="Bold" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,0,15,0" Width="150" FlowDirection="RightToLeft" Foreground="#FFF4F4FA"/>
<Border BorderBrush="#CC9D9D9F" BorderThickness="0,0,1,0" HorizontalAlignment="Left" VerticalAlignment="Center" Width="1" Height="30" Margin="0,0,10,0"/>
<Grid HorizontalAlignment="Right" Width="40" Height="40" VerticalAlignment="Center">
<Image x:Name="sncIcon" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="40" Source="{Binding CloudIcon, Mode=TwoWay,UpdateSourceTrigger=Default}" Tap="CloudIcon_Tap"/>
<telerikPrimitives:RadBusyIndicator x:Name="radbusyofflinedownload" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed" Margin="-20,0,0,0" IsRunning="True" AnimationStyle="AnimationStyle8" Foreground="Black" FontSize="24"/>
</Grid>
</StackPanel>
</StackPanel>
private DependencyObject FindChildControl<T>(DependencyObject control, string ctrlName)
{
int childNumber = VisualTreeHelper.GetChildrenCount(control);
for (int i = 0; i < childNumber; i++)
{
DependencyObject child = VisualTreeHelper.GetChild(control, i);
FrameworkElement fe = child as FrameworkElement;
// Not a framework element or is null
if (fe == null) return null;
if (child is T && fe.Name == ctrlName)
{
// Found the control so return
return child;
}
else
{
// Not found it - search children
DependencyObject nextLevel = FindChildControl<T>(child, ctrlName);
if (nextLevel != null)
return nextLevel;
}
}
return null;
}
private async void InformationListSelector_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
RadBusyIndicator radBusyIndicator = FindChildControl<RadBusyIndicator>(this, "radbusyofflinedownload") as RadBusyIndicator;
radBusyIndicator.Visibility = Visibility.Visible;
}
도와주세요.