Click here to Skip to main content
15,886,873 members
Articles / Desktop Programming / Windows Forms

FishEyePanel/FanPanel - Examples of custom layout panels in WPF

Rate me:
Please Sign up or sign in to vote.
4.84/5 (66 votes)
25 Sep 2006Ms-PL6 min read 297.7K   11.7K   215  
This article describes how to implement your own WPF layout panels like Grid and StackPanel.
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{300F3620-1EA3-44AF-AAC9-982981A0FB2A}</ProjectGuid>
    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <RootNamespace>FanDemo</RootNamespace>
    <AssemblyName>FanDemo</AssemblyName>
    <WarningLevel>4</WarningLevel>
    <OutputType>winexe</OutputType>
    <MinFrameworkVersionRequired>3.0</MinFrameworkVersionRequired>
    <Install>true</Install>
    <InstallFrom>Web</InstallFrom>
    <UpdateEnabled>true</UpdateEnabled>
    <UpdateMode>Foreground</UpdateMode>
    <UpdateInterval>7</UpdateInterval>
    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
    <UpdatePeriodically>false</UpdatePeriodically>
    <UpdateRequired>false</UpdateRequired>
    <MapFileExtensions>false</MapFileExtensions>
    <ApplicationVersion>1.0.0.*</ApplicationVersion>
    <IsWebBootstrapper>true</IsWebBootstrapper>
    <BootstrapperEnabled>true</BootstrapperEnabled>
    <PublishUrl>Publish\</PublishUrl>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>.\bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugSymbols>false</DebugSymbols>
    <Optimize>true</Optimize>
    <OutputPath>.\bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
    <Reference Include="WindowsBase" />
    <Reference Include="PresentationCore" />
    <Reference Include="PresentationFramework" />
    <Reference Include="UIAutomationProvider" />
    <Reference Include="UIAutomationTypes" />
    <Reference Include="ReachFramework" />
    <Reference Include="System.Printing" />
    <Reference Include="System.ServiceModel" />
    <Reference Include="System.Runtime.Serialization" />
    <Reference Include="System.IdentityModel" />
  </ItemGroup>
  <ItemGroup>
    <ApplicationDefinition Include="App.xaml" />
    <Page Include="Favourites.xaml" />
    <Page Include="Resources\TestData.xaml" />
    <Page Include="Window1.xaml" />
    <Compile Include="App.xaml.cs">
      <DependentUpon>App.xaml</DependentUpon>
      <SubType>Code</SubType>
    </Compile>
    <Compile Include="Window1.xaml.cs">
      <DependentUpon>Window1.xaml</DependentUpon>
      <SubType>Code</SubType>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="FanPanel.cs" />
    <Compile Include="Favourites.xaml.cs">
      <DependentUpon>Favourites.xaml</DependentUpon>
    </Compile>
    <Compile Include="ImagePathConverter.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <EmbeddedResource Include="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <SubType>Designer</SubType>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
    </EmbeddedResource>
    <None Include="Properties\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
    </None>
    <Compile Include="Properties\Resources.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
    <Compile Include="Properties\Settings.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
      <DependentUpon>Settings.settings</DependentUpon>
    </Compile>
    <AppDesigner Include="Properties\" />
  </ItemGroup>
  <ItemGroup>
    <Resource Include="Images\Azul.jpg" />
  </ItemGroup>
  <ItemGroup>
    <Resource Include="Images\Aquarium.jpg" />
    <Resource Include="Images\Ascent.jpg" />
    <Resource Include="Images\Autumn.jpg" />
    <Resource Include="Images\Crystal.jpg" />
    <Resource Include="Images\DaVinci.jpg" />
    <Resource Include="Images\Follow.jpg" />
    <Resource Include="Images\Friend.jpg" />
    <Resource Include="Images\Home.jpg" />
    <Resource Include="Images\Moon flower.jpg" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <Import Project="$(MSBuildBinPath)\Microsoft.WinFX.targets" />
</Project>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
Web Developer
Europe Europe
I am a principal development consultant at Microsoft in the UK specialising in UI development. Recently I've been doing a lot of WPF work including the BBC iMP project shown at MIX06. I've been developing software for over 20 years - VAX, WIN16, MFC, ASP.NET, WinForms, WPF.

My main hobby is cars and my favourite day out is at Thruxton race track driving the Porsche 911 Turbo.

Comments and Discussions