private void Page_Loaded(object sender, RoutedEventArgs e) { letspaly = Task.Run(() => loadItem()); letspaly.Wait(); Debug.WriteLine("End ?"); }
public void loadItem() { using (var entitydb = new AyetContext()) { this.Dispatcher.Invoke(() => { listBorder.Visibility = Visibility.Visible; stackBorder.Visibility = Visibility.Collapsed; }); }}
<ItemsControl Style="{DynamicResource verseNavButtonItemsControl}" x:Name="vb1" Grid.Column="1"> <ItemsControl.ItemTemplate> <DataTemplate> <CheckBox x:Name="vbchk1" Style="{DynamicResource versesNavButtonV}" Uid="{Binding VerseId}" IsChecked="{Binding VerseCheck}" Content="{Binding RelativeDesk}" Tag="{Binding Status}" Click="activeVerseSelected" /> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl>
<ItemsControl x:Name="versesTextData"> <ItemsControl.ItemTemplate> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <StackPanel Orientation="Vertical" Grid.Column="0" HorizontalAlignment="Left" Margin="10,0,10,0"> <TextBlock Margin="15 5 30 5" TextTrimming="CharacterEllipsis" Text="{Binding VerseTr}" VerticalAlignment="Center" FontSize="22" Foreground="#FF1C1E2F" FontFamily="{DynamicResource PoppinsMedium}" /> <Button Visibility="Collapsed" x:Name="fulltextTr" Style="{DynamicResource versesAllShowButton}" Tag="Tamamını Göster" Click="trFullTextLoad" /> </StackPanel> <StackPanel Orientation="Vertical" Grid.Column="1" HorizontalAlignment="Right" Margin="10,0,10,0"> <TextBlock Margin="15 5 30 5" TextTrimming="CharacterEllipsis" Text="{Binding VerseArabic}" FontSize="22" Foreground="#FF1C1E2F" FontFamily="XB Zar" /> <Button Visibility="Collapsed" x:Name="fulltextArabic" Style="{DynamicResource versesAllShowButton}" Tag="Tamamını Göster" Click="arabicFullTextLoad" /> </StackPanel> </Grid> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl>
<Style x:Key="versesTabSearchButton" TargetType="Button"> <Setter Property="Width" Value="24" /> <Setter Property="Height" Value="22" /> <Setter Property="Foreground" Value="#1C1E2F" /> <Setter Property="BorderThickness" Value="0,0,0,0" /> <Setter Property="BorderBrush" Value="{x:Null}" /> <Setter Property="Background" Value="{x:Null}" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Border Width="24" Height="22"> <Icon:PackIconOcticons x:Name="searchIcon" Kind="Search" Width="16" Height="16" Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center" HorizontalAlignment="Center" /> </Border> </ControlTemplate> </Setter.Value> </Setter> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Foreground" Value="Green" /> <Setter Property="Cursor" Value="Hand" /> </Trigger> </Style.Triggers> </Style>