Problem z zamulającym GUI w WPF

0

Piszę w tej chwili program na zaliczenie projektu z WPF. Stworzyłem GUI i pojawia się problem jeżeli wpisuje cokolwiek np do textboxa ostanie wpisane literki pojawią sie czasami nawet 2sek po wciśnięciu. Teoretycznie wykluczyłem fakt iż zamułkę powodują nieefektywne funkcje wywoływane przy zdarzeniu gui (WYKOMENTOWALEM JE)

<Window x:Class="Projekt_zal.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Group MakeR" Height="465" Width="1021.735" WindowState="Normal" WindowStartupLocation="CenterScreen" AllowsTransparency="True"  Background="{x:Null}" WindowStyle="None" Closed="zamykanie" ResizeMode="NoResize">
   
        
<!--**************STYL DLA TABITEMA *************************-->
    <Window.Resources>
        <Style TargetType="{x:Type TabItem}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TabItem}">
                        <Grid>
                            <Border 
                                Name="Border"  
                                BorderBrush="black" 
                                BorderThickness="2,2,2,2" 
                                CornerRadius="5,5,2,2" >
                                <ContentPresenter 
                                    x:Name="ContentSite"
                                    VerticalAlignment="Center"  
                                    HorizontalAlignment="Center" 
                                    ContentSource="Header"  
                                    Margin="5,2,12,2"/>     
                                <Border.Background>
                                    <LinearGradientBrush>
                                        <GradientStop Color="Yellow" Offset="1" />
                                        <GradientStop Color="DarkOrange" Offset="0" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="True"/>
                            <Trigger Property="IsSelected" Value="False">    
                                <Setter TargetName="Border" Property="Background" Value="LightSteelBlue" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        
<!--**************  STYL DLA TABCONTROLA *************************-->
        
        <Style  TargetType="{x:Type TabControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <TabPanel Grid.Row="0" Panel.ZIndex="1" Margin="90,0,2,-2" IsItemsHost="True" Background="Transparent" />
                            <Border Grid.Row="1" BorderBrush="Black" BorderThickness="2" CornerRadius="40, 10, 40, 40" >
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <GradientStop Color="LightCyan" Offset="1" />
                                        <GradientStop Color="White" Offset="0" />
                                    </RadialGradientBrush>
                                </Border.Background>
                                <ContentPresenter ContentSource="SelectedContent" />
                            </Border>
                        </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
     
<!--**************STYL DLA GUZIKA *************************--> 
        
        <Style TargetType="{x:Type Button}">
            <Setter Property="Foreground" Value="white" />
            <Setter Property="Margin" Value="1" />
            <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type Button}">
                                <Grid>
                                    <Rectangle x:Name="GelBackground" Opacity="1" RadiusX="9" RadiusY="9" Fill="{TemplateBinding Background}" StrokeThickness="0.35">              
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                <GradientStop Color="Blue" Offset="0" />
                                                <GradientStop Color="LightBlue" Offset="1" />
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <Rectangle x:Name="GelShine" Margin="2,2,2,0" VerticalAlignment="Top" RadiusX="6"  RadiusY="6" Opacity="1" Stroke="Transparent" Height="15px">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                <GradientStop Color="#ccffffff" Offset="0"/>
                                                <GradientStop Color="Transparent" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
                                </Grid>
                                <ControlTemplate.Triggers>
                                <Trigger Property="IsEnabled" Value="True">
                                <Setter Property="Fill" TargetName="GelBackground">
                                    <Setter.Value>
                                        <RadialGradientBrush>
                                            <GradientStop Color="Lime" Offset="0" />
                                            <GradientStop Color="DarkGreen" Offset="1" />
                                        </RadialGradientBrush>
                                    </Setter.Value>
                                </Setter>       
                                </Trigger>
                            <Trigger Property="IsMouseOver" Value="True">
                                        <Setter Property="Fill" TargetName="GelBackground">
                                            <Setter.Value>
                                                <RadialGradientBrush>
                                                    <GradientStop Color="Red" Offset="0" />
                                                    <GradientStop Color="DarkRed" Offset="1" />
                                                </RadialGradientBrush>
                                            </Setter.Value>
                                        </Setter>
                                    </Trigger>
                                    <Trigger Property="IsPressed" Value="true">
                                        <Setter Property="Fill" TargetName="GelBackground">
                                            <Setter.Value>
                                                <RadialGradientBrush>
                                                    <GradientStop Color="#ffcc00" Offset="0"/>
                                                    <GradientStop Color="#cc9900" Offset="1"/>
                                                </RadialGradientBrush>
                                            </Setter.Value>
                                        </Setter>
                                    </Trigger>
                                </ControlTemplate.Triggers>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                    <Style.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Foreground" Value="Black"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Foreground" Value="Black"/>
                        </Trigger>
                    </Style.Triggers>
                </Style>
    </Window.Resources>
    
    
 <!-- ************************************USTAWIENIA PODSTAWOWE***************************************** -->
 <!-- ************************************************************************************************** -->
    <Grid Height="432.987" Width="956.001">
        <TabControl Name="tabControl1" Margin="0,22.864,91.009,28.58" HorizontalAlignment="Right" Width="797.797">
            <TabControl.BitmapEffect>
                <DropShadowBitmapEffect />
            </TabControl.BitmapEffect>
    <!-- TAB ITEM 1 -->
            <TabItem >
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                    <TextBlock FontSize="13" FontWeight="bold" Text="Podstawowe Ustawienia" Margin="5,0,5,0" VerticalAlignment="Center" />
                    <Image Height="20" Source="D:\Adamczyk_WPF\Projekt_zal\u1.png" />
                    </StackPanel>
                </TabItem.Header>
                <Grid>
                    <Slider Height="21" Margin="398.964,83,0,0" Maximum="100" Minimum="0" Name="slider1" SmallChange="0" Value="0" ValueChanged="slider1_ValueChanged" VerticalAlignment="Top" HorizontalAlignment="Left" Width="236.766" Background="Transparent" BorderBrush="Cornsilk" Foreground="Azure"/>
                    <Slider Height="23" Margin="0,133,113.77,0" Maximum="20" Minimum="0" Name="slider2" SmallChange="0" Value="0" ValueChanged="slider2_ValueChanged" VerticalAlignment="Top" HorizontalAlignment="Right" Width="236.23" />
                    <Label Height="30.054" FontSize="14" Margin="0,106,183.927,0" Name="label1" VerticalAlignment="Top" HorizontalAlignment="Right" Width="106.036">Ilość grup:</Label>
                    <Label Height="33.32" FontSize="14" Margin="0,49,164.927,0" Name="label2" VerticalAlignment="Top" HorizontalAlignment="Right" Width="163.323">Ilość pytań w zestawie:</Label>
                    <TextBox FontSize="10" FontWeight="bold" Height="23" Margin="18.887,68.63,0,0" Name="sciezka" VerticalAlignment="Top" HorizontalAlignment="Left" Width="300" Background="LightBlue" BorderBrush="Black" Foreground="DarkRed" BorderThickness="1"/>
                    <Label Height="28"  FontSize="14" FontWeight="bold" HorizontalAlignment="Left" Margin="16.362,46.359,0,0" Name="label4" VerticalAlignment="Top" Width="120">Scieżka pliku:</Label>
                    <Label Height="28" Margin="0,48.75,140,0" Name="pytania_l" VerticalAlignment="Top" FontSize="15" Foreground="DarkRed" FontWeight="bold"  HorizontalAlignment="Right" Width="39">0</Label>
                    <Label Height="26.664" Margin="0,106.353,165.438,0" Name="grupy_l" VerticalAlignment="Top" FontSize="15" Foreground="DarkRed" FontWeight="bold" HorizontalAlignment="Right" Width="54.808">0</Label>
                    <Button FontSize="13" FontWeight="bold" Foreground="black" Height="28" Margin="161,95.546,0,0" Name="button1" VerticalAlignment="Top" HorizontalAlignment="Left" Width="158" Click="otworz_click">Wybierz pytania</Button>
                    <Button  FontSize="14" FontWeight="bold" Foreground="black" Click="Utwórz_Click" Name="Utwórz" Height="31.108" Margin="0,0,33.762,26.664" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="207.325">Utwórz grupy</Button>
                    <Image HorizontalAlignment="Left" Margin="87.761,0,0,15.554" Name="image1" Stretch="Uniform" Width="200" Source="D:\Adamczyk_WPF\Projekt_zal\Projekt_zal\img\wsiz.png" Height="148.874" VerticalAlignment="Bottom" />
                    <CheckBox FontSize="14" FontWeight="bold" Height="30" Margin="0,0,164.927,124.432" Name="checkBox1" VerticalAlignment="Bottom" BorderThickness="4" HorizontalAlignment="Right" Width="181.978">Dodawaj nagłówek</CheckBox>
                    <CheckBox FontSize="14" FontWeight="bold" Height="25" Margin="0,0,113.77,84.436" Name="checkBox2" VerticalAlignment="Bottom" BorderThickness="4" HorizontalAlignment="Right" Width="229.482">Twórz arkusz odpowiedzi</CheckBox>
                    <Label HorizontalAlignment="Left"  FontSize="14" FontWeight="bold" Margin="16.362,144.43,0,0" Name="label3" Width="157.762" Height="28.886" VerticalAlignment="Top">Ilość pytań w pliku:</Label>
                    <Label HorizontalAlignment="Left" FontSize="16" FontWeight="bold" Foreground="DarkRed" Margin="164.428,143.319,0,0" Name="ilosc" Width="64.438" Height="28.886" VerticalAlignment="Top">0</Label>
                </Grid>
            </TabItem>
   <!-- TAB ITEM 2 -->    
            <TabItem>
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock FontSize="13" FontWeight="bold" Text="Kreator Pytań" Margin="5,0,5,0" VerticalAlignment="Center" />
                        <Image Height="20" Source="D:\Adamczyk_WPF\Projekt_zal\u2.png" />  
                    </StackPanel>
                </TabItem.Header>
                <Grid>
                    <Label Height="30.054" FontSize="14" Margin="0,73.326,0,0" Name="l_pytanie" VerticalAlignment="Top" HorizontalAlignment="Left" Width="106.036">Pytanie:</Label>
                    <Label Height="30.054" FontSize="14" Margin="8,23.946,0,0" Name="l_sciezka_obrazka" VerticalAlignment="Top" HorizontalAlignment="Left" Width="123">Ścieżka obrazka:</Label>
                    <Label Height="30.054" FontSize="14" Margin="12.393,0,0,141.097" Name="l_odpowiedzi" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="106.036">Odpowiedzi:</Label>
                    <TextBox FontSize="10" FontWeight="bold" Height="23" Margin="123.508,23.946,311.974,0" Name="k_obrazek_sciezka" VerticalAlignment="Top" Background="LightBlue" BorderBrush="Black" Foreground="DarkRed" BorderThickness="1"/>
                    <RichTextBox Margin="16.243,102.212,26.757,0" Name="k_pytanie" Background="LightBlue" BorderBrush="Black" Height="65.409" VerticalAlignment="Top" />
                    <RichTextBox Margin="16.572,0,26.757,106.656" Name="k_odpowiedz" Background="LightBlue" BorderBrush="Black" Height="36.409" VerticalAlignment="Bottom" />
                    <Button FontSize="13" Foreground="Black" FontWeight="bold" Height="34.441" Margin="0,15.554,146.491,0" Name="k_wczytaj_obrazek" VerticalAlignment="Top" HorizontalAlignment="Right" Width="119" Click="k_wczytaj_obrazek_Click">Dodaj obrazek</Button>
                </Grid>
            </TabItem>
  <!-- TAB ITEM 3 -->
            <TabItem>
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock FontSize="13" FontWeight="bold" Text="Informacje o programie" Margin="5,0,5,0" VerticalAlignment="Center" />
                        <Image Height="20" Source="D:\Adamczyk_WPF\Projekt_zal\2.gif" />                
                    </StackPanel>
                </TabItem.Header>           
                <Grid>                 
                    <TextBlock TextAlignment="Center" Margin="12,70,2,40" FontSize="22">PROJEKT ZALICZENIOWY</TextBlock>                        
                    <TextBlock TextAlignment="Center" Margin="12,100,2,3" FontSize="22">Autor: Łukasz Babiarz</TextBlock>
                    <TextBlock TextAlignment="Center" Margin="12,130,2,40" FontSize="22">Program: Group Maker</TextBlock>                       
                    <TextBlock TextAlignment="Center" Margin="12,160,2,40" FontSize="22">Data: 10.01.2009R</TextBlock>
                </Grid>
            </TabItem>
        </TabControl>
        <Button Height="23" HorizontalAlignment="Right" Margin="0,26.157,93.009,0" Name="X" VerticalAlignment="Top" Width="24.442" Click="X_Click">X</Button>
        <Button Height="23" FontWeight="bold" HorizontalAlignment="Right" Margin="0,27.151,122.894,0" Name="min" VerticalAlignment="Top" Width="23.331" Click="min_Click">--</Button>
    </Grid>
</Window>
<Window x:Class="Projekt_zal.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Group MakeR" Height="465" Width="1021.735" WindowState="Normal" WindowStartupLocation="CenterScreen" AllowsTransparency="True"  Background="{x:Null}" WindowStyle="None" Closed="zamykanie" ResizeMode="NoResize">
   
        
<!--**************STYL DLA TABITEMA *************************-->
    <Window.Resources>
        <Style TargetType="{x:Type TabItem}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TabItem}">
                        <Grid>
                            <Border 
                                Name="Border"  
                                BorderBrush="black" 
                                BorderThickness="2,2,2,2" 
                                CornerRadius="5,5,2,2" >
                                <ContentPresenter 
                                    x:Name="ContentSite"
                                    VerticalAlignment="Center"  
                                    HorizontalAlignment="Center" 
                                    ContentSource="Header"  
                                    Margin="5,2,12,2"/>     
                                <Border.Background>
                                    <LinearGradientBrush>
                                        <GradientStop Color="Yellow" Offset="1" />
                                        <GradientStop Color="DarkOrange" Offset="0" />
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="True"/>
                            <Trigger Property="IsSelected" Value="False">    
                                <Setter TargetName="Border" Property="Background" Value="LightSteelBlue" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        
<!--**************  STYL DLA TABCONTROLA *************************-->
        
        <Style  TargetType="{x:Type TabControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <TabPanel Grid.Row="0" Panel.ZIndex="1" Margin="90,0,2,-2" IsItemsHost="True" Background="Transparent" />
                            <Border Grid.Row="1" BorderBrush="Black" BorderThickness="2" CornerRadius="40, 10, 40, 40" >
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <GradientStop Color="LightCyan" Offset="1" />
                                        <GradientStop Color="White" Offset="0" />
                                    </RadialGradientBrush>
                                </Border.Background>
                                <ContentPresenter ContentSource="SelectedContent" />
                            </Border>
                        </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
     
<!--**************STYL DLA GUZIKA *************************--> 
        
        <Style TargetType="{x:Type Button}">
            <Setter Property="Foreground" Value="white" />
            <Setter Property="Margin" Value="1" />
            <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type Button}">
                                <Grid>
                                    <Rectangle x:Name="GelBackground" Opacity="1" RadiusX="9" RadiusY="9" Fill="{TemplateBinding Background}" StrokeThickness="0.35">              
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                <GradientStop Color="Blue" Offset="0" />
                                                <GradientStop Color="LightBlue" Offset="1" />
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <Rectangle x:Name="GelShine" Margin="2,2,2,0" VerticalAlignment="Top" RadiusX="6"  RadiusY="6" Opacity="1" Stroke="Transparent" Height="15px">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                <GradientStop Color="#ccffffff" Offset="0"/>
                                                <GradientStop Color="Transparent" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
                                </Grid>
                                <ControlTemplate.Triggers>
                                <Trigger Property="IsEnabled" Value="True">
                                <Setter Property="Fill" TargetName="GelBackground">
                                    <Setter.Value>
                                        <RadialGradientBrush>
                                            <GradientStop Color="Lime" Offset="0" />
                                            <GradientStop Color="DarkGreen" Offset="1" />
                                        </RadialGradientBrush>
                                    </Setter.Value>
                                </Setter>       
                                </Trigger>
                            <Trigger Property="IsMouseOver" Value="True">
                                        <Setter Property="Fill" TargetName="GelBackground">
                                            <Setter.Value>
                                                <RadialGradientBrush>
                                                    <GradientStop Color="Red" Offset="0" />
                                                    <GradientStop Color="DarkRed" Offset="1" />
                                                </RadialGradientBrush>
                                            </Setter.Value>
                                        </Setter>
                                    </Trigger>
                                    <Trigger Property="IsPressed" Value="true">
                                        <Setter Property="Fill" TargetName="GelBackground">
                                            <Setter.Value>
                                                <RadialGradientBrush>
                                                    <GradientStop Color="#ffcc00" Offset="0"/>
                                                    <GradientStop Color="#cc9900" Offset="1"/>
                                                </RadialGradientBrush>
                                            </Setter.Value>
                                        </Setter>
                                    </Trigger>
                                </ControlTemplate.Triggers>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                    <Style.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Foreground" Value="Black"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Foreground" Value="Black"/>
                        </Trigger>
                    </Style.Triggers>
                </Style>
    </Window.Resources>
    
    
 <!-- ************************************USTAWIENIA PODSTAWOWE***************************************** -->
 <!-- ************************************************************************************************** -->
    <Grid Height="432.987" Width="956.001">
        <TabControl Name="tabControl1" Margin="0,22.864,91.009,28.58" HorizontalAlignment="Right" Width="797.797">
            <TabControl.BitmapEffect>
                <DropShadowBitmapEffect />
            </TabControl.BitmapEffect>
    <!-- TAB ITEM 1 -->
            <TabItem >
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                    <TextBlock FontSize="13" FontWeight="bold" Text="Podstawowe Ustawienia" Margin="5,0,5,0" VerticalAlignment="Center" />
                    <Image Height="20" Source="D:\Adamczyk_WPF\Projekt_zal\u1.png" />
                    </StackPanel>
                </TabItem.Header>
                <Grid>
                    <Slider Height="21" Margin="398.964,83,0,0" Maximum="100" Minimum="0" Name="slider1" SmallChange="0" Value="0" ValueChanged="slider1_ValueChanged" VerticalAlignment="Top" HorizontalAlignment="Left" Width="236.766" Background="Transparent" BorderBrush="Cornsilk" Foreground="Azure"/>
                    <Slider Height="23" Margin="0,133,113.77,0" Maximum="20" Minimum="0" Name="slider2" SmallChange="0" Value="0" ValueChanged="slider2_ValueChanged" VerticalAlignment="Top" HorizontalAlignment="Right" Width="236.23" />
                    <Label Height="30.054" FontSize="14" Margin="0,106,183.927,0" Name="label1" VerticalAlignment="Top" HorizontalAlignment="Right" Width="106.036">Ilość grup:</Label>
                    <Label Height="33.32" FontSize="14" Margin="0,49,164.927,0" Name="label2" VerticalAlignment="Top" HorizontalAlignment="Right" Width="163.323">Ilość pytań w zestawie:</Label>
                    <TextBox FontSize="10" FontWeight="bold" Height="23" Margin="18.887,68.63,0,0" Name="sciezka" VerticalAlignment="Top" HorizontalAlignment="Left" Width="300" Background="LightBlue" BorderBrush="Black" Foreground="DarkRed" BorderThickness="1"/>
                    <Label Height="28"  FontSize="14" FontWeight="bold" HorizontalAlignment="Left" Margin="16.362,46.359,0,0" Name="label4" VerticalAlignment="Top" Width="120">Scieżka pliku:</Label>
                    <Label Height="28" Margin="0,48.75,140,0" Name="pytania_l" VerticalAlignment="Top" FontSize="15" Foreground="DarkRed" FontWeight="bold"  HorizontalAlignment="Right" Width="39">0</Label>
                    <Label Height="26.664" Margin="0,106.353,165.438,0" Name="grupy_l" VerticalAlignment="Top" FontSize="15" Foreground="DarkRed" FontWeight="bold" HorizontalAlignment="Right" Width="54.808">0</Label>
                    <Button FontSize="13" FontWeight="bold" Foreground="black" Height="28" Margin="161,95.546,0,0" Name="button1" VerticalAlignment="Top" HorizontalAlignment="Left" Width="158" Click="otworz_click">Wybierz pytania</Button>
                    <Button  FontSize="14" FontWeight="bold" Foreground="black" Click="Utwórz_Click" Name="Utwórz" Height="31.108" Margin="0,0,33.762,26.664" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="207.325">Utwórz grupy</Button>
                    <Image HorizontalAlignment="Left" Margin="87.761,0,0,15.554" Name="image1" Stretch="Uniform" Width="200" Source="D:\Adamczyk_WPF\Projekt_zal\Projekt_zal\img\wsiz.png" Height="148.874" VerticalAlignment="Bottom" />
                    <CheckBox FontSize="14" FontWeight="bold" Height="30" Margin="0,0,164.927,124.432" Name="checkBox1" VerticalAlignment="Bottom" BorderThickness="4" HorizontalAlignment="Right" Width="181.978">Dodawaj nagłówek</CheckBox>
                    <CheckBox FontSize="14" FontWeight="bold" Height="25" Margin="0,0,113.77,84.436" Name="checkBox2" VerticalAlignment="Bottom" BorderThickness="4" HorizontalAlignment="Right" Width="229.482">Twórz arkusz odpowiedzi</CheckBox>
                    <Label HorizontalAlignment="Left"  FontSize="14" FontWeight="bold" Margin="16.362,144.43,0,0" Name="label3" Width="157.762" Height="28.886" VerticalAlignment="Top">Ilość pytań w pliku:</Label>
                    <Label HorizontalAlignment="Left" FontSize="16" FontWeight="bold" Foreground="DarkRed" Margin="164.428,143.319,0,0" Name="ilosc" Width="64.438" Height="28.886" VerticalAlignment="Top">0</Label>
                </Grid>
            </TabItem>
   <!-- TAB ITEM 2 -->    
            <TabItem>
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock FontSize="13" FontWeight="bold" Text="Kreator Pytań" Margin="5,0,5,0" VerticalAlignment="Center" />
                        <Image Height="20" Source="D:\Adamczyk_WPF\Projekt_zal\u2.png" />  
                    </StackPanel>
                </TabItem.Header>
                <Grid>
                    <Label Height="30.054" FontSize="14" Margin="0,73.326,0,0" Name="l_pytanie" VerticalAlignment="Top" HorizontalAlignment="Left" Width="106.036">Pytanie:</Label>
                    <Label Height="30.054" FontSize="14" Margin="8,23.946,0,0" Name="l_sciezka_obrazka" VerticalAlignment="Top" HorizontalAlignment="Left" Width="123">Ścieżka obrazka:</Label>
                    <Label Height="30.054" FontSize="14" Margin="12.393,0,0,141.097" Name="l_odpowiedzi" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="106.036">Odpowiedzi:</Label>
                    <TextBox FontSize="10" FontWeight="bold" Height="23" Margin="123.508,23.946,311.974,0" Name="k_obrazek_sciezka" VerticalAlignment="Top" Background="LightBlue" BorderBrush="Black" Foreground="DarkRed" BorderThickness="1"/>
                    <RichTextBox Margin="16.243,102.212,26.757,0" Name="k_pytanie" Background="LightBlue" BorderBrush="Black" Height="65.409" VerticalAlignment="Top" />
                    <RichTextBox Margin="16.572,0,26.757,106.656" Name="k_odpowiedz" Background="LightBlue" BorderBrush="Black" Height="36.409" VerticalAlignment="Bottom" />
                    <Button FontSize="13" Foreground="Black" FontWeight="bold" Height="34.441" Margin="0,15.554,146.491,0" Name="k_wczytaj_obrazek" VerticalAlignment="Top" HorizontalAlignment="Right" Width="119" Click="k_wczytaj_obrazek_Click">Dodaj obrazek</Button>
                </Grid>
            </TabItem>
  <!-- TAB ITEM 3 -->
            <TabItem>
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock FontSize="13" FontWeight="bold" Text="Informacje o programie" Margin="5,0,5,0" VerticalAlignment="Center" />
                        <Image Height="20" Source="D:\Adamczyk_WPF\Projekt_zal\2.gif" />                
                    </StackPanel>
                </TabItem.Header>           
                <Grid>                 
                    <TextBlock TextAlignment="Center" Margin="12,70,2,40" FontSize="22">PROJEKT ZALICZENIOWY</TextBlock>                        
                    <TextBlock TextAlignment="Center" Margin="12,100,2,3" FontSize="22">Autor: Łukasz </TextBlock>
                    <TextBlock TextAlignment="Center" Margin="12,130,2,40" FontSize="22">Program: Group Maker</TextBlock>                       
                    <TextBlock TextAlignment="Center" Margin="12,160,2,40" FontSize="22">Data: 10.01.2009R</TextBlock>
                </Grid>
            </TabItem>
        </TabControl>
        <Button Height="23" HorizontalAlignment="Right" Margin="0,26.157,93.009,0" Name="X" VerticalAlignment="Top" Width="24.442" Click="X_Click">X</Button>
        <Button Height="23" FontWeight="bold" HorizontalAlignment="Right" Margin="0,27.151,122.894,0" Name="min" VerticalAlignment="Top" Width="23.331" Click="min_Click">--</Button>
    </Grid>
</Window>

</image></image></image></image></image></image></image></image>

0
            <TabControl.BitmapEffect>
                <DropShadowBitmapEffect />
            </TabControl.BitmapEffect>

Usuń wszystkie BitmapEffect i sprawdź jak będzie działać program. BitmapEffect są renderowane programowo i dlatego program zaczyna działać tak wolno. Zamiast nich użyj Effect, które są renderowane sprzętowo.

0

O widzisz :) dzięki wielkie za pomoc sam bym nigdy na to nie wpadł ... obsatwialem ze to wina <grid> w tabitemach a tymczasem to taka pierdółka :)

1 użytkowników online, w tym zalogowanych: 0, gości: 1