Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as C# by Mike ( 15 years ago )
<ListBox x:Name="resultsPreviewImage" Grid.Row="1" Padding="0" VerticalAlignment="Top" Margin="0, 20, 0, 0" BorderThickness="0" HorizontalAlignment="Center" >
                                                <ListBox.ItemsPanel>
                                                    <ItemsPanelTemplate>
                                                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" />
                                                    </ItemsPanelTemplate>
                                                </ListBox.ItemsPanel>
                                                <ListBox.ItemTemplate>
                                                    <DataTemplate>
                                                        <StackPanel HorizontalAlignment="Center">
                                                            <Border BorderThickness="1" BorderBrush="DarkGray" CornerRadius="5">
                                                                <StackPanel>
                                                                    <Controls:DockPanel >
                                                                        <Button Controls:DockPanel.Dock="Right">
                                                                            <Image Source="../Images/refresh.png" Width="15" Height="15" />
                                                                        </Button>
                                                                        <sdk:Label Name="browserName" Content="{Binding Path=BrowserName}" HorizontalAlignment="Center" FontSize="12" FontWeight="Bold"  Margin="15, 0, 0, 0" />
                                                                    </Controls:DockPanel>
                                                                    <Image Width="250" Height="250" Name="imgSource" VerticalAlignment="Center" Source="{Binding Path=ImageName}" />
                                                                    <sdk:Label Name="screenshotProcessingTime" Content="5s" HorizontalAlignment="Center" />
                                                                </StackPanel>
                                                            </Border>
                                                        </StackPanel>
                                                    </DataTemplate>
                                                </ListBox.ItemTemplate>
      
                                                <ListBox.Style>
                                                    <Style TargetType="ListBox">
                                                        <Setter Property="Template">
                                                            <Setter.Value>
                                                                <ControlTemplate TargetType="ListBox">
                                                                    <Grid>
                                                                        <ScrollViewer x:Name="ScrollViewerElement" Padding="{TemplateBinding Padding}">
                                                                            <ScrollViewer.Style>
                                                                                <Style TargetType="ScrollViewer">
                                                                                    <Setter Property="IsEnabled" Value="true" />
                                                                                    <Setter Property="Foreground" Value="#FF000000" />
                                                                                    <Setter Property="HorizontalContentAlignment" Value="Left" />
                                                                                    <Setter Property="VerticalContentAlignment" Value="Top" />
                                                                                    <Setter Property="Cursor" Value="Arrow" />
                                                                                    <Setter Property="FontSize" Value="11" />
                                                                                    <Setter Property="HorizontalScrollBarVisibility" Value="Auto" />
                                                                                    <Setter Property="VerticalScrollBarVisibility" Value="Hidden" />
                                                                                    <Setter Property="Template">
                                                                                        <Setter.Value>
                                                                                            <ControlTemplate TargetType="ScrollViewer">
                                                                                                <Border CornerRadius="1" BorderBrush="Transparent" BorderThickness="1">
                                                                                                    <Grid Background="{TemplateBinding Background}">
                                                                                                        <Grid.ColumnDefinitions>
                                                                                                            <ColumnDefinition Width="*"/>
                                                                                                            <ColumnDefinition Width="Auto"/>
                                                                                                        </Grid.ColumnDefinitions>
                                                                                                        <Grid.RowDefinitions>
                                                                                                            <RowDefinition Height="*"/>
                                                                                                            <RowDefinition Height="Auto"/>
                                                                                                        </Grid.RowDefinitions>
                                                                                                        <Rectangle Grid.Column="1" Grid.Row="1" Fill="#FFE9E9E9" />
                                                                                                        <ScrollContentPresenter x:Name="ScrollContentPresenterElement" Grid.Column="0" Grid.Row="0"
                                                                                                                                Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"
                                                                                                                                Cursor="{TemplateBinding Cursor}" Margin="{TemplateBinding Padding}" />
                                                                                                        <ScrollBar x:Name="VerticalScrollBarElement" Grid.Column="1" Grid.Row="0" Orientation="Vertical" 
                                                                                                                   Cursor="Arrow" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" ViewportSize="{TemplateBinding ViewportHeight}"
                                                                                                                   Minimum="0" Maximum="{TemplateBinding ScrollableHeight}" Value="{TemplateBinding VerticalOffset}"
                                                                                                                   Width="18"/>
                                                                                                        <ScrollBar x:Name="HorizontalScrollBarElement" Grid.Column="0" Grid.Row="1" Orientation="Horizontal"
                                                                                                                   Cursor="Arrow" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                                                                                                   ViewportSize="{TemplateBinding ViewportWidth}" Minimum="0" Maximum="{TemplateBinding ScrollableWidth}"
                                                                                                                   Value="{TemplateBinding HorizontalOffset}" Height="18"/>
                                                                                                    </Grid>
                                                                                                </Border>
                                                                                            </ControlTemplate>
                                                                                        </Setter.Value>
                                                                                    </Setter>
                                                                                </Style>
                                                                            </ScrollViewer.Style>
                                                                            <ItemsPresenter />
                                                                        </ScrollViewer>
                                                                    </Grid>
                                                                </ControlTemplate>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Style>
                                                </ListBox.Style>

                                            </ListBox>

 

Revise this Paste

Your Name: Code Language: