DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> XML學習教程 >> XML詳解 >> 用XAML做網頁!!—終結篇(下)
用XAML做網頁!!—終結篇(下)
編輯:XML詳解     

因篇幅過長,分為三次發布,請諒解.

  接上頁

                          <LinearGradIEntBrushEndPoint="0.5,1"StartPoint="0.5,0">
                            <GradIEntStopColor="#FFD04B00"Offset="1"/>
                            <GradIEntStopColor="#FFFF7816"Offset="0.5"/>
                            <GradIEntStopColor="#FFF26802"Offset="0.5"/>
                            <GradIEntStopColor="#FFFF9D56"Offset="0"/>
                          </LinearGradIEntBrush>
                        </Border.Background>
                        <TextBlockText="{TemplateBindingContent}"/>
            </Border>
                      <ControlTemplate.Triggers>
                        <TriggerProperty="IsChecked"Value="True">
                          <SetterProperty="Foreground"Value="#B84901"/>
                          <SetterTargetName="tag"Property="Margin"Value="0"/>
                          <SetterTargetName="tag"Property="Padding"Value="18,4"/>
                          <SetterTargetName="tag"Property="Background">
                            <Setter.Value>
                              <LinearGradIEntBrushEndPoint="0.5,1"StartPoint="0.5,0">
                                <GradIEntStopColor="#FFF1D1"Offset="1"/>
                                <GradIEntStopColor="#FFF7E5"Offset="0.5"/>
                                <GradIEntStopColor="#FFF1D0"Offset="0.5"/>
                                <GradIEntStopColor="#FFF9EA"Offset="0"/>
                              </LinearGradIEntBrush>
                            </Setter.Value>
                          </Setter>
                          <SetterTargetName="tag"Property="BorderBrush"Value="#FFFBF0"/>
                        </Trigger>
                      </ControlTemplate.Triggers>
                    </ControlTemplate>
                  </Setter.Value>
                </Setter>
              </Style>
            </Grid.Resources>
            <PathVerticalAlignment="Bottom"Grid.ColumnSpan="10"Height="1"Stretch="Fill"StrokeLineJoin="Round"Stroke="#FFFFFFFF"Data="F1M52,307L252.003,307"/>
            <RectangleOpacity="0.7"Grid.Column="0"Width="28"Fill="{StaticResourceShadowLeft}"/>
            <RectangleOpacity="0.7"Grid.Column="9"Width="28"Fill="{StaticResourceShadowRight}"/>
            <RadioButtonIsChecked="True"VerticalAlignment="Bottom"Grid.Column="1">簡介</RadioButton>
            <RadioButtonVerticalAlignment="Bottom"Grid.Column="2">使用指南</RadioButton>
            <RadioButtonVerticalAlignment="Bottom"Grid.Column="3">更新及下載</RadioButton>
            <RadioButtonVerticalAlignment="Bottom"Grid.Column="4">注冊</RadioButton>
            <RadioButtonVerticalAlignment="Bottom"Grid.Column="5">廣告投放</RadioButton>
            <RadioButtonVerticalAlignment="Bottom"Grid.Column="6">海外推廣合作</RadioButton>
            <RadioButtonVerticalAlignment="Bottom"Grid.Column="7">關於</RadioButton>
          </Grid>
        </Border>
        <Borderx:Name="Footer"BorderBrush="#888"BorderThickness="0,4,0,0"DockPanel.Dock="Bottom"Height="55">
          <Border.Background>
            <LinearGradIEntBrushStartPoint="0,0"EndPoint="1,0">
              <GradIEntStopColor="#FF686868"Offset="0"/>
              <GradIEntStopColor="#FFC8C8C8"Offset="0.7"/>
              <GradIEntStopColor="#FF686868"Offset="1"/>
            </LinearGradIEntBrush>
          </Border.Background>
          <DockPanelLastChildFill="False">
            <RectangleDockPanel.Dock="Left"Width="28"Fill="{StaticResourceLightLeft}"/>
            <RectangleDockPanel.Dock="Right"Width="28"Fill="{StaticResourceLightRight}"/>
            <TextBlockVerticalAlignment="Center"FontSize="14"Foreground="#DDD">Copyright©2008SkyD'sBlogAllRightsReserved.</TextBlock>
          </DockPanel>
        </Border>
        <DockPanelx:Name="Body">
          <DockPanel.Background>
            <LinearGradIEntBrushStartPoint="0,0"EndPoint="0,1">
              <GradIEntStopColor="#FFF1D1"Offset="0"/>
              <GradIEntStopColor="#FFFFFCD1"Offset="0.1"/>
            </LinearGradIEntBrush>
          </DockPanel.Background>
          <RectangleOpacity="0.2"Width="28"DockPanel.Dock="Left"Fill="{StaticResourceShadowLeft}"/>
          <RectangleOpacity="0.2"Width="28"DockPanel.Dock="Right"Fill="{StaticResourceShadowRight}"/>
          <DockPanelx:Name="Side"DockPanel.Dock="Right"Width="245">
            <RectangleWidth="1"DockPanel.Dock="Left">
              <Rectangle.Fill>
                <LinearGradIEntBrushStartPoint="0,0"EndPoint="0,1">
                  <GradIEntStopColor="#00000000"Offset="0"/>
                  <GradIEntStopColor="#1E874900"Offset="0.4"/>
                  <GradIEntStopColor="#1E874900"Offset="0.6"/>
                  <GradIEntStopColor="#00000000"Offset="1"/>
                </LinearGradIEntBrush>
              </Rectangle.Fill>
            </Rectangle>
            <StackPanel>
              <StackPanel.Background>
                <RadialGradientBrushCenter="0.0,0.5"GradIEntOrigin="0.0,0.5">
                  <RadialGradientBrush.GradIEntStops>
                    <GradIEntStopColor="#10AA6600"Offset="0"/>
                    <GradIEntStopColor="#00AA6600"Offset="1"/>
                  </RadialGradientBrush.GradIEntStops>
                  <RadialGradIEntBrush.RelativeTransform>
                    <TransformGroup/>
                  </RadialGradIEntBrush.RelativeTransform>
                </RadialGradIEntBrush>
              </StackPanel.Background>
              <BorderMargin="28,20,4,0"BorderBrush="#AC690C"BorderThickness="1"CornerRadius="3"Padding="12">
                <Border.Background>
                  <LinearGradIEntBrushStartPoint="0,0"EndPoint="0,1">
                    <GradIEntStopColor="#FFF4963F"Offset="0"/>
                    <GradIEntStopColor="#FFD5461F"Offset="1"/>
                  </LinearGradIEntBrush>
                </Border.Background>
                <TextBlockFontSize="15"HorizontalAlignment="Center"TextAlignment="Center"Foreground="#FFC">
                  當前最新版本<LineBreak/>v0.9.4.13
                </TextBlock>
              </Border>
              <BorderMargin="28,20,4,0"BorderBrush="#AC690C"BorderThickness="1"CornerRadius="3"Padding="12">
                <Border.Background>
                  <LinearGradIEntBrushStartPoint="0,0"EndPoint="0,1">
                    <GradIEntStopColor="#FFFFD66B"Offset="0"/>
                    <GradIEntStopColor="#FFF79E17"Offset="1"/>
                  </LinearGradIEntBrush>
                </Border.Background>
                <TextBlockFontSize="15"HorizontalAlignment="Center"TextAlignment="Center"Foreground="#FFC">
                  新手入門教程
                </TextBlock>
              </Border>
              <BorderMargin="28,20,4,0"BorderBrush="#F3CB56"BorderThickness="1"CornerRadius="3"Padding="12">
                <Border.Background>
                  <LinearGradIEntBrushStartPoint="0,0"EndPoint="0,1">
                    <GradIEntStopColor="#FFFFF99C"Offset="0"/>
                    <GradIEntStopColor="#FFF"Offset="1"/>
                  </LinearGradIEntBrush>
                </Border.Background>
                <TextBlockTextAlignment="Justify"TextTrimming="CharacterEllipsis"FontSize="12"Foreground="#BD730D">
                 <RunFontSize="15"FontWeight="Bold">最近更新:</Run><LineBreak/>
                  新增加可為附件分別添加注釋的功能<LineBreak/>
日志中記錄的本次發送出的郵件附件將顯示文件圖標<LineBreak/>
將設置界面的伸縮組收縮時的邊框改為圓角矩形<LineBreak/>
增加附言使用Html代碼的選項<LineBreak/>
完善幫助信息<LineBreak/>
修正附件詳細信息顯示的BUG<LineBreak/>
增加默認標題、附言設置選項<LineBreak/>
增加簽名設置選項<LineBreak/>
                  變更系統信息的顯示位置和樣式<LineBreak/>
                  在配置管理器打開時會自動選擇當前所使用的配置<LineBreak/>
將選項設置中的組改為可伸縮型<LineBreak/>
                  收件人及附件列表增加了全選及取消全選的快捷菜單<LineBreak/>
增加了一個選項用以控制文件發送失敗後的重試次數<LineBreak/>
增加了一個選項用以控制郵件內是否寫入文件的原始信息
                </TextBlock>
              </Border>
            </StackPanel>
          </DockPanel>
          <StackPanelx:Name="Content">
            <BorderBorderBrush="#6FA34000"BorderThickness="1"Padding="16,8"Margin="24,24,48,0"CornerRadius="5">
              <Border.Background>
                <LinearGradIEntBrushEndPoint="0,1"StartPoint="1,0">
                  <GradIEntStopColor="#FFFFBF6A"Offset="1"/>
                  <GradIEntStopColor="#FFFFEFCA"Offset="0"/>
                </LinearGradIEntBrush>
              </Border.Background>
              <TextBlockForeground="#FFB95400"FontSize="20">MailMail簡介</TextBlock>
            </Border>
            <FramePadding="0,0,24,0"Source="Info.xaml"Width="{BindingElementName=Content,Path=ActualWidth}"/>
          </StackPanel>
        </DockPanel>
      </DockPanel>
    </Grid>
  </ScrollVIEwer>
</Page>

總結

  可以看到,一帆風順的設計伴隨著一個糟糕的結局結束了,流文檔讓我大失所望,液態布局存在巨大缺陷。

  流文檔如果不能很好的重用,那麼它的意義非常渺小。

  液態布局中容器和內容的尺寸沖突很可能是設計上的BUG,它們本應該通過公開的依賴屬性來完美協調,但是它們根本沒有那麼做。

  我希望這些只是因為我的用法不對而造成的結果,期待能有高手指出優雅的解決方式,如果無人能予以解決,那只能寄希望於微軟完善了。



 

 

XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved