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

  • Home
  • SEARCH
  • 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 7496777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T18:46:45+00:00 2026-05-29T18:46:45+00:00

In coding a WPF application I used a ListView and defined an template as

  • 0

In coding a WPF application I used a ListView and defined an template as a resource at that level:

<ListView IsSynchronizedWithCurrentItem="true" ItemTemplate="{StaticResource CardViewTemplate}">
    <!--ItemTemplate="{StaticResource CardViewTemplate}" -->
    <ListView.ItemsPanel>
        <ItemsPanelTemplate>
            <WrapPanel></WrapPanel>
        </ItemsPanelTemplate>
    </ListView.ItemsPanel>
    <ListView.Resources>
        <DataTemplate x:Key="CardViewTemplate">
            <GroupBox Header="{Binding Path=Product Name}" Width="290" BorderThickness="4" FontSize="14"
                    FontStyle="Normal" Padding="10" BorderBrush="DarkBlue" Background="{x:Null}" Margin="12"
                    UseLayoutRounding="True">
                <StackPanel Name="stackPanel1">
                    <WrapPanel Orientation="Vertical" Name="wrapPanel1">
                        <WrapPanel Orientation="Horizontal">
                            <TextBlock MinWidth="80" Text="{Binding Path=Product
                                                             Name}" FontSize="16" FontWeight="Bold"
                                    TextAlignment="Center" />
                        </WrapPanel>
            </GroupBox>
        </DataTemplate>
    </ListView.Resources>
</ListView>

This works perfectly however when I use a Resource (Expression Dark) at the Window Level the ListView appears blank.

Any suggestions as to what could be the cause? I have tried everything I could think about

  • 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-05-29T18:46:46+00:00Added an answer on May 29, 2026 at 6:46 pm

    There could be multiple reasosns…

    1. Is your ListView directly under your Window?
    2. If your Dark template correctly configured?
    3. Does it apply if you directly set it under the list view (without static resource reference)…

       <ListView>
         <ListView.ItemTemplate>
            <DataTemplate x:Key="CardViewTemplate">
                ...
            </DataTemplate> 
         </ListView.ItemTemplate>
       </ListView> 
      

    ?

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

Sidebar

Related Questions

Has anyone used CSLA in an application that has a WPF front end and
I am coding a WPF application using MVVM pattern. I don't need to have
I'm coding a GUI using WPF and Expression Blend for an application which is
I have coded a WPF application with complex video and trans coding features, using
I'm writing a WPF desktop application and have a view that needs to look
In my WPF Application, I specify an Application.Resource, as shown here: <Application x:Class=MyApp [...]>
Just got a very mysterious error while coding a WPF-application in C#. I've got
My trouble is that I want my WPF ListView to display ListViewItems in different
In coding a traditional MVC application, what is the best practice for coding server-side
I would like to develop a small notifications application for Windows in .NET that

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.