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 7439245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:40:40+00:00 2026-05-29T10:40:40+00:00

The control resets to the standard ListView in the designer when I declare a

  • 0

The control resets to the standard ListView in the designer when I declare a view in XAML.

        <my1:CustomControl1.View>
            <GridView></GridView>
        </my1:CustomControl1.View>

I tried doing the same thing in code. The CustomControl1.Template changes from having a TargetType of “CustomControl1” to the default ListView template after I set the view to a new GridView().

The template itself doesn’t seem to be the problem – it works if I use it as a local resource. If I can’t get this working I could make a UserControl with a templated listview inside but for various reasons I’d like a CustomControl. Any help appreciated.

  • 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-29T10:40:42+00:00Added an answer on May 29, 2026 at 10:40 am

    I found another solution here. You create your own GridView class and have it return the custom control as the default style key. You then use this instead of the standard gridview

    http://social.msdn.microsoft.com/forums/en-US/wpf/thread/056df061-0666-4fe2-9fa6-8a6440a23ff0/

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

Sidebar

Related Questions

In a ListView control, the focus is on some Item within that control -
From MSDN entry for Control.ResetText() : Resets the Text property to its default value.
I use Telerik RadCalendar ASP.NET control. How I can in code reset selected date?
Control Panel -> Security Center I really like the components/controls which are used to
I have a repeater control that contains an ItemTemplate containing a databound label and
To a WinForms control, I would like to add a handler after the container
I have a datepicker control setup using the JQuery UI, I am also using
I have a Custom Control that has multiple textbox fields and a checkbox contained
I have a SafeInvoke Control extension method similar to the one Greg D discusses
The windows forms control library project (C++) I writes uses an unmanaged dll. The

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.