Click here to Skip to main content
15,913,090 members
Home / Discussions / C#
   

C#

 
QuestionFtpWebRequest Upload question Pin
KaptinKrunch31-Oct-08 8:38
KaptinKrunch31-Oct-08 8:38 
Questionhow to retreive correct control.visible property of a hidden control in c# Pin
Dino2Dino31-Oct-08 8:32
Dino2Dino31-Oct-08 8:32 
AnswerRe: how to retreive correct control.visible property of a hidden control in c# Pin
EliottA31-Oct-08 9:50
EliottA31-Oct-08 9:50 
AnswerRe: how to retreive correct control.visible property of a hidden control in c# Pin
Giorgi Dalakishvili31-Oct-08 11:45
mentorGiorgi Dalakishvili31-Oct-08 11:45 
GeneralRe: how to retreive correct control.visible property of a hidden control in c# Pin
Luc Pattyn31-Oct-08 12:21
sitebuilderLuc Pattyn31-Oct-08 12:21 
QuestionRe: how to retreive correct control.visible property of a hidden control in c# Pin
nelsonpaixao31-Oct-08 13:49
nelsonpaixao31-Oct-08 13:49 
AnswerRe: how to retreive correct control.visible property of a hidden control in c# Pin
Dave Kreskowiak1-Nov-08 5:20
mveDave Kreskowiak1-Nov-08 5:20 
QuestionList<int> in wpf designer</int> [modified] Pin
vincentgr31-Oct-08 8:02
vincentgr31-Oct-08 8:02 
[I MOVED THIS MESSAGE TO THE WPF FORUM: link[^]

Hi!
After searches on google and the built in help of visual studio, I tried to get an answer on this question in the MSDN forum, but nobody seems to answer there. I hope i get better results here!

Here's my (slightly edited) post i posted on the MSDN forum:
Hi,

I'd like to make a List<int> property in a custom control, and, when I add that custom control to the main window of the application, want to be able to edit, add and remove elements from that list. The problem is that I can't edit the items in the designer.
I did the following:
1. Create a WPF application
2. Add a Custom Control (WPF)
3. Changed the code in the CustomControl1 class to the following:
public class CustomControl1 : Control 
    { 
        static CustomControl1() 
        { 
            DefaultStyleKeyProperty.OverrideMetadata(typeof(CustomControl1), new FrameworkPropertyMetadata(typeof(CustomControl1))); 
        } 
        private List<int> _intlist = new List<int>(); 
        public List<int> intlist 
        { 
            get { return _intlist; } 
            set { _intlist = value; } 
        } 
    } 
} </int></int></int>

4. Added the namespace to the XAML file of the Window1.xaml from the main WPF application
xmlns:CustCtrl1NameSpace="clr-namespace:WpfApplication3"
5. Added the control to the Grid
<Grid> 
    <CustCtrl1NameSpace:CustomControl1/> 
</Grid> 

After i did this, i expected to be able to see and edit the List<int> intlist in the designer, but i can only see it. If i click on the button with the three dots on it on the intlist property in the designer, I get the window to edit it, but everything is grayed out!
I really tried alot of things, and i ran out of ideas now.

Hope you can help me,
Vincent

modified on Friday, October 31, 2008 2:37 PM

AnswerRe: List in wpf designer Pin
Pedram Behroozi31-Oct-08 8:16
Pedram Behroozi31-Oct-08 8:16 
GeneralRe: List in wpf designer Pin
vincentgr31-Oct-08 8:33
vincentgr31-Oct-08 8:33 
GeneralRe: List in wpf designer Pin
Pedram Behroozi31-Oct-08 8:41
Pedram Behroozi31-Oct-08 8:41 
QuestionSNMP Trap or Packet Listner Program --Socket Question. Please advice Pin
jobin00700731-Oct-08 7:23
jobin00700731-Oct-08 7:23 
AnswerRe: SNMP Trap or Packet Listner Program --Socket Question. Please advice Pin
jobin0070075-Nov-08 15:54
jobin0070075-Nov-08 15:54 
QuestionTabControl question Pin
aalex67531-Oct-08 6:29
aalex67531-Oct-08 6:29 
AnswerRe: TabControl question Pin
Pedram Behroozi31-Oct-08 7:33
Pedram Behroozi31-Oct-08 7:33 
GeneralRe: TabControl question Pin
aalex67531-Oct-08 7:37
aalex67531-Oct-08 7:37 
GeneralRe: TabControl question Pin
Pedram Behroozi31-Oct-08 7:56
Pedram Behroozi31-Oct-08 7:56 
QuestionHow to get a list of open files? Pin
Dirk.Bock31-Oct-08 5:40
Dirk.Bock31-Oct-08 5:40 
AnswerRe: How to get a list of open files? Pin
Eddy Vluggen31-Oct-08 5:57
professionalEddy Vluggen31-Oct-08 5:57 
AnswerRe: How to get a list of open files? Pin
Giorgi Dalakishvili31-Oct-08 8:42
mentorGiorgi Dalakishvili31-Oct-08 8:42 
QuestionMerchant Connect - Webservice anyone? Pin
sameerhanda31-Oct-08 5:37
sameerhanda31-Oct-08 5:37 
AnswerRe: Merchant Connect - Webservice anyone? Pin
Paul Conrad31-Oct-08 7:34
professionalPaul Conrad31-Oct-08 7:34 
Questionlistbox population Pin
arkiboys31-Oct-08 5:27
arkiboys31-Oct-08 5:27 
AnswerRe: listbox population Pin
Eddy Vluggen31-Oct-08 5:48
professionalEddy Vluggen31-Oct-08 5:48 
GeneralRe: listbox population Pin
Luc Pattyn31-Oct-08 7:14
sitebuilderLuc Pattyn31-Oct-08 7:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.