Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8877043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:22:19+00:00 2026-06-14T19:22:19+00:00

I am creating a windows store application that currently loads a simple class (which

  • 0

I am creating a windows store application that currently loads a simple class (which loads 5 items).

I use a simple grid to load the items in and then set some styling;

code snippet;

<Grid  Background="{StaticResource ApplicationPageBackgroundThemeBrush}" Margin="261,111,10,302">
        <ListView ItemsSource="{Binding}" Name="lstMatters" SelectionMode="Multiple">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal" Tapped="spMatter_Tapped" >
                        <Image Source="{StaticResource MatterImage}"></Image>
                        <GridView ItemContainerStyle="{StaticResource GridViewItemStyle1}" SelectionMode="None">
                            <GridView.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <VirtualizingStackPanel Orientation="Horizontal" IsHitTestVisible="False"/>
                                </ItemsPanelTemplate>
                            </GridView.ItemsPanel>
                            <GridViewItem Margin="3" Style="{StaticResource gridViewHeader}" Content="FileRef: " FontSize="20"></GridViewItem>
                            <GridViewItem Margin="3" Content="{Binding Path=FileRef}" FontSize="20"></GridViewItem>
                            <GridViewItem Margin="3" Style="{StaticResource gridViewHeader}" Content="Description: " FontSize="20"></GridViewItem>
                            <GridViewItem Margin="3" Content="{Binding Path=Description}" FontSize="20"></GridViewItem>
                            <GridViewItem Margin="3" Style="{StaticResource gridViewHeader}" Content="DocumentSet: " FontSize="20"></GridViewItem>
                            <GridViewItem Margin="3" Content="{Binding Path=DocumentSet}" FontSize="20"></GridViewItem>
                            <GridViewItem Margin="3" Style="{StaticResource gridViewHeader}" Content="MatterType: " FontSize="20"></GridViewItem>
                            <GridViewItem Margin="3" Content="{Binding Path=MatterType}" FontSize="20"></GridViewItem>
                        </GridView>
                    </StackPanel>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ListView>
    </Grid>

I am trying to create a “dynamic” style in the sence that, when the DocumentSet column loads and displays in the grid, the code will do a type of “switch” statement and according to the DocumentSet, use a spesific style.
(i.e. change the gridViewItem’s style depending on the DocumentSet’s value.

Switch DocumentSet
Case "a"
 style = style.a
Case "b"
 style = style.b)

Hope that made sense?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:22:20+00:00Added an answer on June 14, 2026 at 7:22 pm

    Try this video by Jerry Nixon. It is basically to show how to implement interstitial ads, but you can use same concept by using the ListView.ItemTemplateSelector.

    http://youtu.be/kTBdCgVVjug

    Arun

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating Windows Store application, that retrieves data asynchronously from web service and then
I am creating a windows phone application, which need to store some data in
Hello I am creating a Windows application (WPF) that is going to be running
I'm currently writing a PHP application and i noticed that my page loads kinda
Does Windows (or NTFS in general) store the name of the application that created
I am creating an application using javascript/HTML for windows 8 which basically displays text
I am creating a application that store basic database connection info like host,user, password
I am working on a Windows Desktop application that will store a number of
When creating an application that will be targeted to many versions of Windows what
I'm creating a windows service that will let different users connect to the PC

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.