FisshEye for Silverlight 是 Expression 社区中的一个示例(http://gallery.expression.microsoft.com/FishEye)。原来的代码中实现的 Panel 的子元素只能横向排列,我在原来的代码的基础上添加了一个 Orientation 属性,实现像 StackPanel 的效果可以横向或纵向排列子元素。

FishEye for Silverlight

 

默认为横向排列方式

      <fish:FishEyePanel Margin="0,50,0,0" Magnification="3" ScaleToFit="False" Height="50" VerticalAlignment="Top">
            <Button Height="50">
                <Image Source="images/Alarm.png" Stretch="Fill"/>
            </Button>
            <Button Height="50">
                <Image Source="images/Anouncement.png" Stretch="Fill"/>
            </Button>
            <Button Height="50">
                <Image Source="images/Config-Tools.png" Stretch="Fill" />
            </Button>
            <Button Height="50">
                <Image Source="images/Paste.png" Stretch="Fill"/>
            </Button>
            <Button Height="50">
                <Image Source="images/Under-construction.png" Stretch="Fill"/>
            </Button>
            <Button Height="50">
                <Image Source="images/Vista-Shield.png" Stretch="Fill"/>
            </Button>
        </fish:FishEyePanel>

 

纵向排列方式

      <fish:FishEyePanel 

Orientation="Vertical"

 Magnification="3" ScaleToFit="False" Width="50">
            <Button Width="50">
                <Image Source="images/Alarm.png" Stretch="Fill"/>
            </Button>
            <Button Width="50">
                <Image Source="images/Anouncement.png" Stretch="Fill"/>
            </Button>
            <Button Width="50">
                <Image Source="images/Config-Tools.png" Stretch="Fill" />
            </Button>
            <Button Width="50">
                <Image Source="images/Paste.png" Stretch="Fill"/>
            </Button>
            <Button Width="50">
                <Image Source="images/Under-construction.png" Stretch="Fill"/>
            </Button>
            <Button Width="50">
                <Image Source="images/Vista-Shield.png" Stretch="Fill"/>
            </Button>
        </fish:FishEyePanel>

源代码下载

相关文章:

  • 2021-05-21
  • 2021-07-24
  • 2022-12-23
  • 2021-11-06
  • 2022-02-03
  • 2021-05-26
  • 2021-11-14
  • 2021-12-19
猜你喜欢
  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
  • 2021-11-26
  • 2021-07-21
  • 2021-07-16
  • 2021-07-06
相关资源
相似解决方案