Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

WPF Amazon Explorer Using 3D

, 27 Feb 2008 CPOL
WPF Amazon Explorer Using 3D
explorer3d.zip
Explorer3D
Explorer3D
3dTools
3DTools.dll
bin
Debug
3DTools.dll
Explorer3D.application
Explorer3D.exe
Explorer3D.exe.manifest
Explorer3D.vshost.application
Explorer3D.vshost.exe
Controls
Explorer3d.csproj.user
Misc Classes
obj
Debug
Controls
TempPE
Properties
app.manifest
Settings.settings
Resources
Amazon.png
arrows.png
banner.png
Favourites.png
Service References
AmazonService
AmazonSearch.wsdl
configuration.svcinfo
Explorer3D.AmazonService.GetTransactionDetailsResponse.datasource
Explorer3D.AmazonService.ListingProductDetails.datasource
Explorer3D.AmazonService.MarketplaceSearch.datasource
Explorer3D.AmazonService.ProductInfo.datasource
Explorer3D.AmazonService.ProductLine.datasource
Explorer3D.AmazonService.SellerProfile.datasource
Explorer3D.AmazonService.SellerSearch.datasource
Explorer3D.AmazonService.ShoppingCart.datasource
Reference.svcmap
<Window x:Class="Explorer3D.FlowDocumentWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Explorer3D" Height="600" Width="800"
    WindowState="Normal"
    WindowStartupLocation="CenterOwner"
    Icon="Resources\arrows.png"
    ShowInTaskbar="False"
    >
    
    <Window.Resources>
        
        <!-- Header Brush -->
        <SolidColorBrush x:Key="headerBrush" Color="#FFFF940C"/>
        
        <!-- Favourites Button Style -->
        <Style x:Key="favButtonStyle" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border x:Name="bord" Width="Auto" Height="Auto" Background="{x:Null}" BorderBrush="{x:Null}" BorderThickness="2,2,2,2" CornerRadius="5,5,5,5">
                            <ContentPresenter Width="Auto" Height="Auto" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger  Property="IsMouseOver" Value="True">
                                <Setter TargetName="bord" Property="BorderBrush" Value="#FFFF940C"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </Window.Resources>
    
    <!-- FLOW DOCUMENT VIEWER START -->
    <FlowDocumentPageViewer x:Name="flowDocViewer"  Margin="0,0,0,0" Background="#FF414141" Zoom="100" >
        
        <!-- FLOW DOCUMENT START -->    
        <FlowDocument x:Name="flowDoc" Foreground="White" FontFamily="Arial"  >

            <FlowDocument.Background>
                <RadialGradientBrush GradientOrigin="0.5,0.5" Center="0.5,0.5"
                        RadiusX="0.5" RadiusY="0.5">
                    <GradientStop Color="#FF424242" Offset="0" />
                    <GradientStop Color="#FF333333" Offset="0.25" />
                    <GradientStop Color="#FF0F0F0F" Offset="0.75" />
                    <GradientStop Color="#FF000000" Offset="1" />
                </RadialGradientBrush>
            </FlowDocument.Background>




            <Table CellSpacing="5" Padding="5" Foreground="White" FontFamily="Arial" FontWeight="Bold" FontSize="10">
                <Table.Columns>
                    <TableColumn Width="250"/>
                    <TableColumn/>
                </Table.Columns>

                <TableRowGroup>
                    <TableRow>

                        <TableCell ColumnSpan="1" RowSpan="1" TextAlignment="Left">
                            <Paragraph FontSize="35" Foreground="#FFFF940C" FontWeight="Bold">Amazon Detail</Paragraph>
                        </TableCell>

                        <TableCell ColumnSpan="1" RowSpan="1" TextAlignment="Left">
                            <BlockUIContainer>
                                <Button Width="60" Height="60" Style="{StaticResource favButtonStyle}" ToolTip="Add this Amazon Detail As A Favourite" Click="Button_Click">
                                    <Image Source="resources/Favourites.png" Stretch="Fill" Width="50" Height="50"/>
                                </Button>    
                            </BlockUIContainer>
                        </TableCell>
                    </TableRow>
                </TableRowGroup>

            </Table>



            
            <Paragraph FontSize="11">
                This page is a simple FlowDocument that is part of the Windows.Document namespace, and it
                has been included in this application, simply to show how easy it is to create simple Documents
                which have Paragrpahs/Links/Images and can be scaled up/down using the FlowDocumentReader control.
                This only really touches the surface of what you can do with FlowDocument(s) in WPF, you can also
                use all sort of text effects, like subscript/superscript/underline. You can also use tables. In fact
                with FlowDocument(s) you can acheive some pretty slick looking documents. At least this should give you a 
                a flavour of what can be done. I hope.
            </Paragraph>
            <Paragraph FontSize="22" Foreground="#FFFF940C" FontWeight="Bold">A Quick Word About This Item</Paragraph>
            <Paragraph x:Name="para1" FontSize="11">
                The following details have been obtained from Amazon to match your initial query. 
                Some of the returned values may have been empty, so have been ommitted from the
                results shown here. Also where there have been more than one value returned via
                the Amazon Details, these to have been omitted for the sake of keeping things simple
                for this small demo application. Simple is good, when trying to show how something works
            </Paragraph>


        </FlowDocument>
    </FlowDocumentPageViewer>
</Window>

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 Code Project Open License (CPOL)

Share

About the Author

Sacha Barber
Software Developer (Senior)
United Kingdom United Kingdom
I currently hold the following qualifications (amongst others, I also studied Music Technology and Electronics, for my sins)
 
- MSc (Passed with distinctions), in Information Technology for E-Commerce
- BSc Hons (1st class) in Computer Science & Artificial Intelligence
 
Both of these at Sussex University UK.
 
Award(s)

I am lucky enough to have won a few awards for Zany Crazy code articles over the years

  • Microsoft C# MVP 2015
  • Codeproject MVP 2015
  • Microsoft C# MVP 2014
  • Codeproject MVP 2014
  • Microsoft C# MVP 2013
  • Codeproject MVP 2013
  • Microsoft C# MVP 2012
  • Codeproject MVP 2012
  • Microsoft C# MVP 2011
  • Codeproject MVP 2011
  • Microsoft C# MVP 2010
  • Codeproject MVP 2010
  • Microsoft C# MVP 2009
  • Codeproject MVP 2009
  • Microsoft C# MVP 2008
  • Codeproject MVP 2008
  • And numerous codeproject awards which you can see over at my blog

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150129.1 | Last Updated 27 Feb 2008
Article Copyright 2008 by Sacha Barber
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid