www.pudn.com > wpfwin7.rar > MainWindow.xaml, change:2012-05-10,size:4891b


<Window x:Class="MyWindow.MainWindow" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        Title="MainWindow" Height="350" Width="525" WindowState="Maximized" WindowStyle="None" ResizeMode="NoResize" > 
    <Window.Background> 
        <ImageBrush ImageSource="psb12321.jpg"></ImageBrush> 
    </Window.Background> 
    <Grid> 
        <Grid.RowDefinitions> 
            <RowDefinition Height="15"></RowDefinition> 
            <RowDefinition Height="*"></RowDefinition> 
            <RowDefinition Height="35"></RowDefinition> 
        </Grid.RowDefinitions> 
        <Grid.ColumnDefinitions> 
            <ColumnDefinition Width="15"></ColumnDefinition> 
            <ColumnDefinition Width="*"></ColumnDefinition> 
            <ColumnDefinition Width="15"></ColumnDefinition> 
        </Grid.ColumnDefinitions>        
   
        <!--桌面主区域--> 
        <ListBox Name="lbxMainDeskArea" Grid.Row="1" Grid.Column="1"> 
            <ListBox.Template> 
                <ControlTemplate TargetType="{x:Type ListBox}"> 
                    <WrapPanel Orientation="Vertical" IsItemsHost="True" > 
                        <WrapPanel.Background> 
                            <ImageBrush ImageSource="1.png" Opacity="0.4"></ImageBrush> 
                        </WrapPanel.Background> 
                    </WrapPanel> 
                </ControlTemplate> 
            </ListBox.Template> 
            <ListBoxItem Margin="5"> 
                <StackPanel> 
                    <Image MouseLeftButtonDown="image2_MouseLeftButtonDown"   Height="60" Name="image5" Source="10.png" Stretch="Fill" Width="60" /> 
                <Label Foreground="White">我的电脑</Label> 
                </StackPanel> 
            </ListBoxItem> 
            <ListBoxItem Margin="5"> 
                <StackPanel> 
                    <Image   Height="60" Name="image6" Source="ie.png" Stretch="Fill" Width="60" /> 
                    <Label Foreground="White" HorizontalContentAlignment="Center">浏览器</Label> 
                </StackPanel> 
            </ListBoxItem> 
            <ListBoxItem Margin="5"> 
                <StackPanel> 
                    <Image   Height="60"   Source="qq.png" Stretch="Fill" Width="60" /> 
                    <Label Foreground="White" HorizontalContentAlignment="Center">QMe</Label> 
                </StackPanel> 
            </ListBoxItem> 
            <ListBoxItem Margin="5"> 
                <StackPanel> 
                    <Image   Height="60"   Source="media.png" Stretch="Fill" Width="60" /> 
                    <Label Foreground="White">媒体中心</Label> 
                </StackPanel> 
            </ListBoxItem> 
        </ListBox> 
         
        <!--任务栏--> 
        <ListBox Grid.Row="2" Grid.ColumnSpan="2"    Name="lbxTaskBar" > 
            <ListBox.Template> 
                <ControlTemplate TargetType="{x:Type ListBox}"> 
                    <WrapPanel Orientation="Horizontal" IsItemsHost="True" > 
                        <WrapPanel.Background> 
                            <ImageBrush ImageSource="1.png" Opacity="0.8"></ImageBrush> 
                        </WrapPanel.Background> 
                    </WrapPanel> 
                </ControlTemplate> 
            </ListBox.Template> 
             
            <ListBoxItem Margin="5,0,0,0"> 
                <Image   Height="35" Name="imgStartMenu" Source="2.png" Stretch="Fill" Width="44" /> 
            </ListBoxItem> 
            <ListBoxItem Margin="5,0,0,0"> 
                <Image ToolTip="我的电脑 点击激活" MouseLeftButtonDown="image2_MouseLeftButtonDown"  Height="35" Name="image2" Source="10.png" Stretch="Fill" Width="44" /> 
            </ListBoxItem> 
            <ListBoxItem Margin="5,0,0,0"> 
                <Image   Height="35" Name="image3" Source="ie.png" Stretch="Fill" Width="44" /> 
            </ListBoxItem> 
        </ListBox> 
         
        <!--任务栏最右边一块--> 
        <Image Grid.Row="2" Grid.Column="2" Source="3.png"></Image> 
         
        <!--小插件-时钟-->   
        <Canvas   Name="canvas1" HorizontalAlignment="Left" VerticalAlignment="Top"> 
            <StackPanel ToolTip="拖动到你喜欢的位置" Name="spClock" MouseLeftButtonDown="image1_MouseLeftButtonDown" MouseLeftButtonUp="image1_MouseLeftButtonUp"  MouseLeave="image1_MouseLeave" MouseMove="image1_MouseMove" Canvas.Left="339" Canvas.Top="16" Height="117"> 
                <Label Foreground="Red" ToolTip="Close" HorizontalContentAlignment="Right" MouseLeftButtonDown="Label_MouseLeftButtonDown">X</Label> 
                <Label Foreground="White">小插件--时钟</Label> 
                <Image Source="clock.png"  Stretch="Fill" Height="69" Width="94" /> 
            </StackPanel> 
        </Canvas> 
    </Grid>     
</Window>